In GM all the trigonometric functions work in radians, but most people work in degrees and this means that to convert your degrees into radians you need to use this function. For example,

degtorad(180)returns 3.14159265 radians. This function translates degrees into radians using the formula:angle_radians = angle_degrees * pi / 180

degtorad(deg);

Argument | Description |
---|---|

deg | The degrees to convert. |

Real

val = degtorad(90);

This will set val to pi/2.