math.floor

From Garry's Mod
Jump to: navigation, search
 math.floor( )

Contents

Description

Floors or rounds a number down.

Arguments

number number

The number to be rounded down.

Returns

number

floored numbers

Examples

Example

Round pi.

print(math.floor(math.pi))

Output:

3

Examples

Example

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

local value = 3.6

print( math.Round( value ), math.floor( value ) )

Output:

4 3
Personal tools
Navigation