pike.ida.liu.se
Search for
Home > Docs > Pike reference

[Top]
Math

Math.convert_angle()


Method convert_angle

int|float 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", "gon" and "str" for degrees, radians, gon and streck respectivly. The output is not guaranteed to be within the first turn, e.g. converting 10 radians yields almost 573 degrees as output.

Module reference for Pike v7.8 release 116, 2008-12-31