Converts radians to degrees.


GML Code Example


Argument Description
rad The radians to convert.

Returns: Real


Once you have done your calculations using sin, or cos etc... the result is in radians. This may not always be what you want and so to turn the radians into degrees we use this function. For example, radtodeg(sin(180)) will return -45 degrees. This function translates radians into degrees using the formula:

GML Code Example

angle_degrees = angle_radians * 180 / pi;


GML Code Example

val = radtodeg( pi );

This will set val to 180.

No Examples Submitted

Does this page need better examples? Be the first to Submit

No Edits Suggested

Is this page unclear or not descriptive enough? Suggest an edit to the page and with enough upvotes your changes will be made.

No Questions Have Been Ask

Do you have a question about this page? Ask it Here