Garry's Mod Wiki

Garry's Mod Wiki

  number math.floor( number number )

Description

Floors or rounds a number down.

Arguments

1 number number
The number to be rounded down.

Returns

1 number
floored numbers

Example

Round pi.

print(math.floor(math.pi))
Output: 3

Example

Demonstrates the difference between math.Round and math.floor.

local value = 3.6 print( math.Round( value ), math.floor( value ) )
Output: 4 3

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated twice a day. Edits and history are not available.

Last Parsed: Loading...