Constructs Vector from components. If no components present vector will be filled with 0
Construct euler vector from quaternion
Alias to allow easy data access
Alias to vector type. Can be used to contruct vectors of same type
Alias to data type (e.g. float, int)
Returns true if vector is normalised
Normalises vector in place
Normalises vector
Abs vector values
Calculates angle between this vector and v2 from [0, 0]
Calculates angle between this vector and v2 from [0, 0]
Calculates angle between line this->to and X ordinate
Ceils vector values
Clamps vector values
Clamps vector values
Clamps vector values in place
Clamps vector values in place
Returns copy of vector
Calculates cross product of this and b, assumes that Z = 0
Calculates cross product of this and b
Calculates cross product of this and b, W is multiplication of a.w and b.w
Returns squared distance from vector to b
Calculates distance to vector b
Performs dot product
Floors vector values
Is vector approximately close to v
Returns true if vector is normalised
Returns vector length
Returns squared vector length
Linear interpolates vector
Limits length of vector and returns resulting vector
Clamps vector values to max
Clamps vector values to min
Moves vector toward target
Normalises vector in place
Normalises vector
opBinary x [+, -, *, /, %] y
opCast cast(x) y
Cast to matrix (column/row matrix)
Cast to color
Cast to bool
opCmp x [< > <= >=] y
opEquals x == y
opOpAssign x [+, -, *, /, %]= y
opUnary [-, +, --, ++] x
Invert vector
Returns vector perpendicular to this
Returns pointer to data
Calculates reflected vector to normal
Calculates direction of refracted ray where this is incoming ray, n is normal vector and r is refractive ratio
Rotates vector by angle
Rounds vector values
Signs current vector
Snaps vector values
Snaps vector values
Snaps vector values in place
Snaps vector values in place
Returns hash
Returns string representation of vector: [1.00, 1.00,... , 1.00]
Projects vector3 from screen space into object space
Mixes in swizzle
Vector structure with data accesible with [N] or swizzling.
All operations on Vector (*, +, /, -, etc...) are scalar.
Allows casting to sily.color or sily.matrix.