Vector4
is a vector suitable for three-dimensional
math, containing (x, y, z, w) components
Static variables
Static methods
staticinlineangleBetween(a:Vector4, b:Vector4):Float
Constructor
Variables
read onlylengthSquared:Float
Get the squared length of this vector
(avoiding the use of Math.sqrt
for faster
performance)
Methods
inlinecrossProduct(a:Vector4, ?result:Vector4):Vector4
inlinedecrementBy(a:Vector4):Void
inlinedotProduct(a:Vector4):Float
inlineincrementBy(a:Vector4):Void
inlinenearEquals(toCompare:Vector4, tolerance:Float, allFour:Bool = false):Bool
Whether two Vector4
instances have nearly equal component values.
Comparison is performed within a given tolerance value.
Parameters:
toCompare | A |
---|---|
tolerance | A floating point value determining how near the values must be to be considered near equal |
allFour | (Optional) Whether to compare against the w component (default is false) |
Returns:
Whether both instances have equal values, within the given tolerance
inlinenegate():Void
Negates the x, y and z values of the current vector (multiplying each value by -1)
inlinescaleBy(s:Float):Void
Scales the x, y and z component values by a scale value
Parameters:
s | The amount of scale to apply |
---|