Extracted from Pike v7.3 release 53 at 2002-09-10.
pike.ida.liu.se
[Top]
Math

Method Math.convert_angle()


Method convert_angle

int|float Math.convert_angle(int|float angle, string from, string to)

Description

This function converts between degrees, radians and gons. The from and to arguments may be any of the follwoing strings: "deg", "rad" and "gon" for degrees, radians and gon respectivly. The output is not guaranteed to be within the first turn, e.g. converting 10 radians yields almost 573 degrees as output.