Wowpedia
Wowpedia
229,684
pages
These functions are implemented by FrameXML in FrameXML/Vector2D.lua and FrameXML/Vector3D.lua.

Scales a 2D or 3D vector's length by multiplying or dividing each coordinate.

vector:ScaleBy(scalar)
vector:DivideBy(scalar)
vector:Normalize()

Arguments

scalar 
number - Multiplied or divided into each coordinate.

Details

  • Normalize() is equivalent to vector:DivideBy(vector:GetLength()), resulting in a unit vector (length = 1).

Patch changes

References

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