Nodejs Degree to Radian Convert deg2Rad(deg)

Here you can find the source of deg2Rad(deg)

Method Source Code

/**//from   w  ww.ja va 2 s .co  m
 * Converts the specified angle in degrees to radians.
 * @param {Number} deg
 */
Math.deg2Rad = function(deg)
{
   return (deg / 180) * Math.PI;
}

Related

  1. degToRad(angle)
    function degToRad(angle) {
      return ((angle * Math.PI) / 180);
    
  2. degToRad(deg)
    function degToRad(deg) {
      return deg * Math.PI / 180;
    
  3. toRadians(degrees)
    Math.toRadians = function(degrees){
      if (degrees < 0) {
        degrees += 360;
      return degrees / 180 * Math.PI;
    };
    
  4. degrees(radians)
    Math.degrees = function(radians){
      return radians * 180 / Math.PI;
    };