Difference between revisions of "DegreesToRadians - Math"
Jump to navigation
Jump to search
imported>JustinOther m (→Examples: Floatified float params) |
imported>Haravikk |
||
Line 21: | Line 21: | ||
float x = DegreesToRadians(360.0) ; x ~= 6.28318 | float x = DegreesToRadians(360.0) ; x ~= 6.28318 | ||
float y = DegreesToRadians(90.0) ; y ~= 1.57080 | float y = DegreesToRadians(90.0) ; y ~= 1.57080 | ||
</source> | |||
== Notes == | |||
The same result can be achieved without a function call by simply multiplying by 0.01745329252: | |||
<source lang="papyrus"> | |||
float x = 360.0 * 0.01745329252 ; x ~= 6.28318 | |||
float y = 90.0 * 0.01745329252 ; y ~= 1.57080 | |||
</source> | </source> | ||
Latest revision as of 16:21, 25 February 2020
Member of: Math Script
Converts from degrees to radians.
Syntax[edit | edit source]
float Function DegreesToRadians(float afDegrees) native global
Parameters[edit | edit source]
- afDegrees: The value in degrees to convert.
Return Value[edit | edit source]
The passed-in value converted to radians.
Examples[edit | edit source]
float x = DegreesToRadians(360.0) ; x ~= 6.28318
float y = DegreesToRadians(90.0) ; y ~= 1.57080
Notes[edit | edit source]
The same result can be achieved without a function call by simply multiplying by 0.01745329252:
float x = 360.0 * 0.01745329252 ; x ~= 6.28318
float y = 90.0 * 0.01745329252 ; y ~= 1.57080