Node.js examples for Geometry:Radian
Convert degrees to radians and convert radians to degrees (signed)
Number.prototype.toRad = function() { // convert degrees to radians return this * Math.PI / 180; } Number.prototype.toDeg = function() { // convert radians to degrees (signed) return this * 180 / Math.PI; }