Skip to content

compute deg2rad

kgryte edited this page May 12, 2015 · 1 revision

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

var val = compute.deg2rad( 90 );
// returns pi/2

var data = [ 0, 45, 90, 135, 180 ];
compute.deg2rad( data );
// returns [ 0, pi/4, pi/2, 3pi/4, pi ]

Note: mutates the input array.

Clone this wiki locally