Garry's Mod Wiki

Garry's Mod Wiki

All numbers in Lua use the double-precision floating-point format. Even integers are stored in this format. The math library is the primary number operation library that contains trigonometric, rounding and useful constants. The following is a comprehensive list of all valid ways to define numbers in Lua.

print( 123, --- 123 123.456, --- 123.456 123.456e7, --- 1234560000 0x123.456e7, --- 291.271216... 123e4, --- 1230000 123e+4, --- 1230000 123e-4, --- 0.0123 0x0FFp2, --- 1020 0x0FFp+2, --- 1020 0x0FFp-2, --- 63.75 -- 123e4.5 is not valid -- 0x0FFp123.456 is not valid )

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated four times a day. Edits and history are not available.

Last Parsed: Loading...