lovr.math
EditThe lovr.math
module provides math helpers commonly used for 3D applications.
Randomization
Functions for generating random numbers and noise.
lovr.math.getRandomSeed | Get the random seed. |
lovr.math.newRandomGenerator | Create a new RandomGenerator. |
lovr.math.noise | Generate simplex noise. |
lovr.math.random | Get a random number. |
lovr.math.randomNormal | Get a random number from a normal distribution. |
lovr.math.setRandomSeed | Set the random seed. |
Vectors
A collection of vector objects. Check out the Vectors
guide for an introduction.
lovr.math.drain | Drain the temporary vector pool. |
lovr.math.mat4 | Create a temporary Mat4. |
lovr.math.newMat4 | Create a new Mat4. |
lovr.math.newQuat | Create a new Quat. |
lovr.math.newVec2 | Create a new Vec2. |
lovr.math.newVec3 | Create a new Vec3. |
lovr.math.newVec4 | Create a new Vec4. |
lovr.math.quat | Create a temporary Quat. |
lovr.math.vec2 | Create a temporary Vec2. |
lovr.math.vec3 | Create a temporary Vec3. |
lovr.math.vec4 | Create a temporary Vec4. |
Other
Other miscellaneous math objects/helpers.
lovr.math.gammaToLinear | Convert a color from gamma space to linear space. |
lovr.math.linearToGamma | Convert a color from linear space to gamma space. |
lovr.math.newCurve | Create a new Curve. |