math.modf

From GMod Wiki

Revision as of 14:41, 13 September 2009 by UnrealomegaBot (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Function
Syntax math.modf( x )
Where is this used?
Description:
Returns two numbers, the integral part of x and the fractional part of x.
Returns: Number number
Part of Library: Math
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Math.modf]Math.modf [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionReturns two numbers, the integral part of a number and the fractional part of number.
Used onNewerShared.png
Code
i, f = math.modf(18.4)
Outputi = 18, f = 0.4
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox