Difference between revisions of "RadiansToDegrees - Math"
Jump to navigation
Jump to search
imported>JLundin |
imported>Haravikk |
||
Line 21: | Line 21: | ||
float x = RadiansToDegrees(6.28318) ; x ~= 360 | float x = RadiansToDegrees(6.28318) ; x ~= 360 | ||
float y = RadiansToDegrees(1.57080) ; y ~= 90 | float y = RadiansToDegrees(1.57080) ; y ~= 90 | ||
</source> | |||
== Notes == | |||
The same result can be achieved without a function call by simply dividing by 0.01745329252: | |||
<source lang="papyrus"> | |||
float x = 6.2831853072 / 0.01745329252 ; x ~= 360 | |||
float y = 1.5707963268 / 0.01745329252 ; y ~= 90 | |||
</source> | </source> | ||
Latest revision as of 16:23, 25 February 2020
Member of: Math Script
Converts from radians to degrees.
Syntax[edit | edit source]
float Function RadiansToDegrees(float afRadians) native global
Parameters[edit | edit source]
- afRadians: The value in radians to convert.
Return Value[edit | edit source]
The passed-in value converted to degrees.
Examples[edit | edit source]
float x = RadiansToDegrees(6.28318) ; x ~= 360
float y = RadiansToDegrees(1.57080) ; y ~= 90
Notes[edit | edit source]
The same result can be achieved without a function call by simply dividing by 0.01745329252:
float x = 6.2831853072 / 0.01745329252 ; x ~= 360
float y = 1.5707963268 / 0.01745329252 ; y ~= 90