Nodejs Degree to Radian Convert toRad()

Here you can find the source of toRad()

Method Source Code

Number.prototype.toRad = function() {
  return this * Math.PI / 180;
};

Number.prototype.toDegree = function() {
  return this / Math.PI * 180;
};

Related

  1. degrees(radians)
    Math.degrees = function(radians){
      return radians * 180 / Math.PI;
    };
    
  2. radians(degrees)
    Math.radians = function(degrees){
      return degrees * Math.PI / 180;
    };
    
  3. degToRad(degrees)
    Math.degToRad = function(degrees){
      return degrees * Math.PI / 180;
    };
    
  4. toRad()
    Number.prototype.toRad = function() {
      return this * Math.PI / 180;
    
  5. toRad()
    Number.prototype.toRad = function() {
      return this * Math.PI / 180;
    Number.prototype.toDeg = function() {
      return this * 180 / Math.PI;
    
  6. toRad()
    Number.prototype.toRad = function() { 
      return this * Math.PI / 180; 
    };
    Number.prototype.toDeg = function() { 
      return this * 180 / Math.PI; 
    };
    global.getPointAtDistance = function(lat, lon, brng, dist) {
      dist = dist / 6371000;
      brng = brng.toRad();
    ...
    
  7. toRad()
    Number.prototype.toRad = function() {
        return this * Math.PI / 180;
    };
    
  8. toRad()
    Number.prototype.toRad = function() {
      return (this / 180) * Math.PI;
    };
    
  9. toRad() // convert degrees to radians
    Number.prototype.toRad = function() {  
      return this * Math.PI / 180;