class Vector4
package lime.math
Vector4
is a vector suitable for three-dimensional
math, containing (x, y, z, w) components
Constructor
Variables
read onlylengthSquared:Float
Get the squared length of this vector
(avoiding the use of Math.sqrt
for faster
performance)
Methods
inline crossProduct (a:Vector4, ?result:Vector4):Vector4
inline decrementBy (a:Vector4):Void
inline dotProduct (a:Vector4):Float
inline incrementBy (a:Vector4):Void
inline nearEquals (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
Static variables
Static methods
staticinline angleBetween (a:Vector4, b:Vector4):Float