Vec3
EditA vector object that holds three numbers.
Constructors
lovr.math.newVec3 | Create a new Vec3. |
lovr.math.vec3 | Create a temporary Vec3. |
Methods
Vec3:add | Add a vector or a number to the vector. |
Vec3:angle | Get the angle to another vector. |
Vec3:cross | Get the cross product with another vector. |
Vec3:distance | Get the distance to another vector. |
Vec3:div | Divides the vector by a vector or a number. |
Vec3:dot | Get the dot product with another vector. |
Vec3:equals | Check if a vector equals another vector. |
Vec3:length | Get the length of the vector. |
Vec3:lerp | Moves this vector some amount towards another one. |
Vec3:mul | Multiply the vector by a vector or a number. |
Vec3:normalize | Normalize the length of the vector to 1. |
Vec3:rotate | Apply a rotation to the vector. |
Vec3:set | Set the components of the vector. |
Vec3:sub | Subtract a vector or a number from the vector. |
Vec3:transform | Apply a transform to the vector. |
Vec3:unpack | Get the components of the vector. |