love.math.linearToGamma

love.math.linearToGamma Available since LÖVE 0.9.1 This function is not supported in earlier versions. Converts a color from linear-space (RGB) to gamma-space (sRGB). This is useful when storing linear RGB color values in an image, because the linear RGB color space has less precision than sRGB for dark colors, which can result in noticeable color banding when drawing. In general, colors chosen based on what they look like on-screen are already in gamma-space and should not be double-conve

love.math.newBezierCurve

love.math.newBezierCurve Available since LÖVE 0.9.0 This function is not supported in earlier versions. Creates a new BezierCurve object. The number of vertices in the control polygon determines the degree of the curve, e.g. three vertices define a quadratic (degree 2) Bézier curve, four vertices define a cubic (degree 3) Bézier curve, etc. Function Synopsis curve = love.math.newBezierCurve( vertices ) Arguments table vertices The vertices of the control polygon as a table in the form of

love.math.newRandomGenerator

love.math.newRandomGenerator Available since LÖVE 0.9.0 This function is not supported in earlier versions. Creates a new RandomGenerator object which is completely independent of other RandomGenerator objects and random functions. Function Synopsis rng = love.math.newRandomGenerator( ) Arguments None Returns RandomGenerator rng The new Random Number Generator object. Function Synopsis rng = love.math.newRandomGenerator( seed ) Arguments number seed The initial seed number to use for

love.math.noise

love.math.noise Available since LÖVE 0.9.0 This function is not supported in earlier versions. Generates a Simplex or Perlin noise value in 1-4 dimensions. The return value will always be the same, given the same arguments. Simplex noise is closely related to Perlin noise. It is widely used for procedural content generation. There are many webpages which discuss Perlin and Simplex noise in detail. The return value might be constant if only integer arguments are used. Avoid solely passing

love.math.random

love.math.random Available since LÖVE 0.9.0 This function is not supported in earlier versions. Generates a pseudo-random number in a platform independent manner. Function Get uniformly distributed pseudo-random real number within [0, 1]. Synopsis number = love.math.random( ) Arguments None. Returns number number The pseudo-random number. Function Get a uniformly distributed pseudo-random integer within [1, max]. Synopsis number = love.math.random( max ) Arguments number max The max

love.math.randomNormal

love.math.randomNormal Available since LÖVE 0.9.0 This function is not supported in earlier versions. Get a normally distributed pseudo random number. Function Synopsis number = love.math.randomNormal( stddev, mean ) Arguments number stddev (1) Standard deviation of the distribution. number mean (0) The mean of the distribution. Returns number number Normally distributed random number with variance (stddev)² and the specified mean. See Also love.math

love.math.setRandomSeed

love.math.setRandomSeed Available since LÖVE 0.9.0 This function is not supported in earlier versions. Sets the seed of the random number generator using the specified integer number. Function Synopsis love.math.setRandomSeed( seed ) Arguments number seed The integer number with which you want to seed the randomization. Must be within the range of [0, 2^53 - 1]. Returns Nothing. Notes Due to Lua's use of double-precision floating point numbers, integer values above 2^53 cannot be accur

love.math.triangulate

love.math.triangulate Available since LÖVE 0.9.0 This function is not supported in earlier versions. Decomposes a simple convex or concave polygon into triangles. Function Synopsis triangles = love.math.triangulate( polygon ) Arguments table polygon Polygon to triangulate. Must not intersect itself. Returns table triangles List of triangles the polygon is composed of, in the form of {{x1, y1, x2, y2, x3, y3}, {x1, y1, x2, y2, x3, y3}, ...}. Function Synopsis triangles = love.math.tr

love.mouse.getCursor

love.mouse.getCursor Available since LÖVE 0.9.0 This function is not supported in earlier versions. Gets the current Cursor. Function Synopsis cursor = love.mouse.getCursor( ) Arguments None. Returns Cursor cursor (nil) The current cursor, or nil if no cursor is set. See Also love.mouse love.mouse.setCursor

love.mouse.getPosition

love.mouse.getPosition Returns the current position of the mouse. Function Synopsis x, y = love.mouse.getPosition( ) Arguments None. Returns number x The position of the mouse along the x-axis. number y The position of the mouse along the y-axis. Examples Use getPosition to help draw a custom mouse image function love.load() love.mouse.setVisible(false) -- make default mouse invisible img = love.graphics.newImage("mouse.png") -- load in a custom mouse image end function love.draw()