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