Garry's Mod Wiki

math.modf

  number, number math.modf( number base )

Description

Returns the integral and fractional component of the modulo operation.

Arguments

1 number base
The base value.

Returns

1 number
The integral component.
2 number
The fractional component.

Example

Finds the integral and fractional components of 5.6.

print( math.modf( 5.6 ) )
Output:
5 0.6