Nodejs Utililty Methods Degree to Radian Convert

List of utility methods to do Degree to Radian Convert

Description

The list of methods to do Degree to Radian Convert are organized into topic(s).

Method

deg2Rad(deg)
Math.deg2Rad = function(deg)
  return (deg / 180) * Math.PI;
degToRad(angle)
function degToRad(angle) {
  return ((angle * Math.PI) / 180);
degToRad(deg)
function degToRad(deg) {
  return deg * Math.PI / 180;
toRadians(degrees)
Math.toRadians = function(degrees){
  if (degrees < 0) {
    degrees += 360;
  return degrees / 180 * Math.PI;
};
degrees(radians)
Math.degrees = function(radians){
  return radians * 180 / Math.PI;
};
radians(degrees)
Math.radians = function(degrees){
  return degrees * Math.PI / 180;
};
degToRad(degrees)
Math.degToRad = function(degrees){
  return degrees * Math.PI / 180;
};
toRad()
Number.prototype.toRad = function() {
  return this * Math.PI / 180;
toRad()
Number.prototype.toRad = function() {
  return this * Math.PI / 180;
Number.prototype.toDeg = function() {
  return this * 180 / Math.PI;
toRad()
Number.prototype.toRad = function() {
  return this * Math.PI / 180;
};
Number.prototype.toDegree = function() {
  return this / Math.PI * 180;
};