Convert degree to Radians - Node.js Geometry

Node.js examples for Geometry:Radian

Description

Convert degree to Radians

Demo Code

Math.toRadians = function(degrees){
  if (degrees < 0) {
    degrees += 360;/*from ww w.java  2 s.co  m*/
  }
  return degrees / 180 * Math.PI;
};

Related Tutorials