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: 35ms

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