math.Rad2Deg

From GMod Wiki

Revision as of 17:37, 21 March 2011 by Non-Robot (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Function
Syntax math.Rad2Deg( Number x )
Where is this used?
Description:
Converts x from radians to degrees.
Returns: Number
Part of Library: Math
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Math.Rad2Deg]Math.Rad2Deg [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionConvert some numbers from radians to degrees.
Used onNewerShared.png
Code
print("1 radians in degrees is " .. math.Rad2Deg(1))
print("90 radians in degrees is " .. math.Rad2Deg(90))
print("-45 radians in degrees is " .. math.Rad2Deg(-45))
Output1 radians in degrees is 57.295779513082

90 radians in degrees is 5156.6201561774

-45 radians in degrees is -2578.3100780887


Additional Notes

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox