love.mouse.getY

love.mouse.getY Returns the current y-position of the mouse. Function Synopsis y = love.mouse.getY( ) Arguments None. Returns number y The position of the mouse along the y-axis. Examples Draw a horizontal line at the mouse's y-position. function love.draw() local y = love.mouse.getY() love.graphics.line(0,y, love.graphics.getWidth(),y) end See Also love.mouse love.mouse.getX love.mouse.getPosition

love.mouse.hasCursor

love.mouse.hasCursor Available since LÖVE 0.10.0 This function is not supported in earlier versions. Gets whether cursor functionality is supported. If it isn't supported, calling love.mouse.newCursor and love.mouse.getSystemCursor will cause an error. Mobile devices do not support cursors. Function Synopsis hascursor = love.mouse.hasCursor( ) Arguments None. Returns boolean hascursor Whether the system has cursor functionality. See Also love.mouse

love.mouse.getX

love.mouse.getX Returns the current x-position of the mouse. Function Synopsis x = love.mouse.getX( ) Arguments None. Returns number x The position of the mouse along the x-axis. Examples Draw a vertical line at the mouse's x-position. function love.draw() local x = love.mouse.getX() love.graphics.line(x,0, x,love.graphics.getHeight()) end See Also love.mouse love.mouse.getY love.mouse.getPosition

love.mouse.getSystemCursor

love.mouse.getSystemCursor Available since LÖVE 0.9.0 This function is not supported in earlier versions. Gets a Cursor object representing a system-native hardware cursor. Hardware cursors are framerate-independent and work the same way as normal operating system cursors. Unlike drawing an image at the mouse's current coordinates, hardware cursors never have visible lag between when the mouse is moved and when the cursor position updates, even at low framerates. Function Synopsis cursor

love.mouse.getRelativeMode

love.mouse.getRelativeMode Available since LÖVE 0.9.2 This function is not supported in earlier versions. Gets whether relative mode is enabled for the mouse. If relative mode is enabled, the cursor is hidden and doesn't move when the mouse does, but relative mouse motion events are still generated via love.mousemoved. This lets the mouse move in any direction indefinitely without the cursor getting stuck at the edges of the screen. The reported position of the mouse is not updated while

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()

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.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.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.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