This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
math [2019/08/26 21:21] – [Vector math] korshun | math [2019/08/26 21:26] – [Length] korshun | ||
---|---|---|---|
Line 196: | Line 196: | ||
Vectors are passed as arguments named '' | Vectors are passed as arguments named '' | ||
- | If a function returns a vector, it uses [[multiple return values]], returning vector components in the same "X Y Z" | + | If a function returns a vector, it uses [[multiple return values]], returning vector components in the same XYZ order, so '' |
If a function accepts more than one vector, the first vector is passed as '' | If a function accepts more than one vector, the first vector is passed as '' | ||
Line 206: | Line 206: | ||
* 3D: '' | * 3D: '' | ||
- | '' | + | These functions return the length of the input vector. |
==== Dot product ==== | ==== Dot product ==== | ||
Line 213: | Line 213: | ||
* 3D: '' | * 3D: '' | ||
- | These functions return the [[wp>dot product]] | + | These functions return |
==== Normalization ==== | ==== Normalization ==== | ||
Line 220: | Line 220: | ||
* 3D: '' | * 3D: '' | ||
- | These functions [[wp> | + | These functions |
- | === Example usage === | + | === Examples |
< | < | ||
normalize3d(x, | normalize3d(x, |