Skip to content

compute rad2deg

kgryte edited this page May 12, 2015 · 1 revision

Converts radians to degrees, where x may be a single numeric value or a numeric array.

var val = compute.rad2deg( Math.PI/2 );
// returns 90

var data = [ 0, Math.PI/4, Math.PI/2, 3*Math.PI/4, Math.PI ];
compute.rad2deg( data );
// returns [ 0, 45, 90, 135, 180 ]

Note: mutates the input array.

Clone this wiki locally