float :get-angle ( float $SIN , float $COS )
Returns the angle (in radians - range [0, 2*PI]) corresponding to provided sin+cos value pair.
If the arguments provided are outside [-1, +1] range, or an argument is missing, returns -1.
# :get-angle example !const =PI f3.1415926535 :float-precision i5 :write s'Enter angle in degrees: ' :set ° i0 :readln ° :set &rad (:div (:mul =PI $deg) f180.0) :writeln s'Angle in radians: ' $rad :set &sin :sin $rad :set &cos :cos $rad :writeln s'sin: ' $sin :writeln s'cos: ' $cos :writeln s'get-angle: ' :get-angle $sin $cos
wikipage modified on 2014/0916/1530