Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia
Advertisement
These functions are implemented in :Dot FrameXML/Vector2D.lua and FrameXML/Vector3D.lua.

Computes the dot product of one vector with another or itself.

vector:Dot(other)
vector:GetLengthSquared()

Arguments[]

other
table - A Vector2DMixin or Vector3DMixin (must be the same kind as the original vector).

Details[]

  • GetLengthSquared() is equivalent to vector:Dot(vector), resulting in the sum of the squares of its coordinates.

Example[]

local vector = CreateVector2D(3, 4)
print vector:GetLengthSquared()       -- 25

Patch changes[]

External links[]

References[]

 
  1. ^ 2017-03-28, Vector2D.lua, version 7.2.0.23835, near line 94, archived at Townlong-Yak
  2. ^ 2017-03-28, Vector3D.lua, version 7.2.0.23835, near line 102, archived at Townlong-Yak
Advertisement