Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Main:Vector/Methods: Difference between revisions

Template page
PenguinEncounter (talk | contribs)
No edit summary
Tag: 2017 source edit
PenguinEncounter (talk | contribs)
m →‎dot: adjust caps
Tag: 2017 source edit
Line 33: Line 33:
----
----


Computes the [[wikipedia:Dot product|Dot product]] between two vectors. The argument must be the same type as the target vector.
Computes the [[wikipedia:dot product|dot product]] between two vectors. The argument must be the same type as the target vector.


{| class="wikitable"
{| class="wikitable"

Revision as of 23:22, 27 October 2024

Math operations

Mathematical operations that apply to all vectors, such as computing their length

length


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