Garry's Mod Wiki

math.floor

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

Page Links


Special Pages


Wikis

?

Render Time: 48ms

DB GetPage 13
Generate Html 9
SaveChanges (1) 13
Render Body 0
Render Sidebar 10