Skip to content

Commit

Permalink
[Doc] Add vec5f definition in example.
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidXu-JJ committed Jun 17, 2024
1 parent dca2286 commit 5446299
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions docs/lang/articles/math/math_module.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ u = v.rraa # vec4(1, 1, 2, 2)
- `ti.Vector` is a function that accepts a 1D array and returns a matrix instance that has only one column. For example, `ti.Vector([1, 2, 3, 4, 5])`.
- `ti.types.vector` is a function that accepts an integer and a primitive type and returns a vector type. For example: `vec5f = ti.types.vector(5, float)`. `vec5f` can then be used to instantiate 5D vectors or annotate data types of function arguments and struct members:
```python
vec5f = ti.types.vector(5, float)
@ti.kernel
def test(v: vec5f):
print(v.xyz)
Expand Down

0 comments on commit 5446299

Please sign in to comment.