More actions
No edit summary Tag: 2017 source edit |
No edit summary Tag: 2017 source edit |
||
Line 15: | Line 15: | ||
|- | |- | ||
| <code>length()</code> | | <code>length()</code> | ||
| {{type|number}} | |||
|} | |||
==== lengthSquared ==== | |||
---- | |||
Computes the length of a vector, squared. Due to the nature of the length calculation, this is a little bit faster than [[#length|<code>length</code>]]. | |||
{| class="wikitable" | |||
! Arguments !! Return Type | |||
|- | |||
| <code>lengthSquared()</code> | |||
| {{type|number}} | |||
|} | |||
==== dot ==== | |||
---- | |||
Computes the [[wikipedia:Dot product|Dot product]] between two vectors. The argument must be the same type as the target vector. | |||
{| class="wikitable" | |||
! Arguments !! Return Type | |||
|- | |||
| <code>dot({{type|Vector}} other)</code> | |||
| {{type|number}} | | {{type|number}} | ||
|} | |} |
Revision as of 23:21, 27 October 2024
Math operations
Mathematical operations that apply to all vectors, such as computing their length
length
Mathematical definition
Computes the Euclidean norm of the vector.
Computes the length of a vector.
Arguments | Return Type |
---|---|
length()
|
number |
lengthSquared
Computes the length of a vector, squared. Due to the nature of the length calculation, this is a little bit faster than length
.
Arguments | Return Type |
---|---|
lengthSquared()
|
number |
dot
Computes the Dot product between two vectors. The argument must be the same type as the target vector.
Arguments | Return Type |
---|---|
dot(Vector other)
|
number |