The lovr.math module provides math helpers commonly used for 3D applications.


lovr.math.gammaToLinear Convert a color from gamma space to linear space.
lovr.math.getRandomSeedGet the random seed.
lovr.math.linearToGamma Convert a color from linear space to gamma space.
lovr.math.lookAtCompute an angle/axis rotation from a vector.
lovr.math.newRandomGeneratorCreate a new RandomGenerator.
lovr.math.newTransformCreate a new Transform.
lovr.math.noiseGenerate perlin noise.
lovr.math.orientationToDirectionConvert an angle/axis orientation to a direction vector.
lovr.math.randomGet a random number.
lovr.math.randomNormalGet a random number from a normal distribution.
lovr.math.setRandomSeedSet the random seed.