Vector3DMixin

From Wowpedia
Jump to: navigation, search

Source: FrameXML/Vector3D.lua

API

Wowpedia icon stamp.png CreateVector3D(x, y, z) : vector - Creates a new vector.
Wowpedia icon stamp.png AreVector3DEqual(left, right) : boolean - Compares if vectors are equal.

Methods

Wowpedia icon stamp.png Vector3DMixin:IsEqualTo(vector) : boolean
Wowpedia icon stamp.png Vector3DMixin:GetXYZ() : x, y, z
Wowpedia icon stamp.png Vector3DMixin:SetXYZ(x, y, z)
Wowpedia icon stamp.png Vector3DMixin:ScaleBy(scalar)
Wowpedia icon stamp.png Vector3DMixin:DivideBy(scalar)
Wowpedia icon stamp.png Vector3DMixin:Add(vector)
Wowpedia icon stamp.png Vector3DMixin:Subtract(vector)
Wowpedia icon stamp.png Vector3DMixin:Cross(vector)
Wowpedia icon stamp.png Vector3DMixin:Dot(vector) : dot
Wowpedia icon stamp.png Vector3DMixin:GetLengthSquared() : lengthSquared
Wowpedia icon stamp.png Vector3DMixin:GetLength() : length
Wowpedia icon stamp.png Vector3DMixin:Normalize()
Wowpedia icon stamp.png Vector3DMixin:Clone() : vector

Example

local foo = CreateVector3D(14, 3, 5)
local bar = CreateVector3D(2, 4, 1)

foo:Add(bar)
print(foo:GetXYZ()) -- 16, 7, 6

Patch changes

See also

External links

References

 
  1. ^ 2017-03-28, Vector3D.lua, version 7.2.0.23835, near line 47, archived at Townlong-Yak