DegreesToRadians - Math

Member of: Math Script

Converts from degrees to radians.

SyntaxEdit

float Function DegreesToRadians(float afDegrees) native global

ParametersEdit

  • afDegrees: The value in degrees to convert.

Return ValueEdit

The passed-in value converted to radians.

ExamplesEdit

float x = DegreesToRadians(360.0) ; x ~= 6.28318
float y = DegreesToRadians(90.0) ; y ~= 1.57080

NotesEdit

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

See AlsoEdit