math.modf

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

Contents

Description

Returns the integral and fractional component of the modulo operation.

Arguments

number base

The base value.

Returns

number

The integral component.

Returns

number

The fractional component.

Examples

Example

Finds the integral and fractional components of 5.6.

print(math.modf(5.6))

Output:

5   0.6
Personal tools
Navigation