Here you can find the source of radToDeg(angle)
function radToDeg(angle) { return ((angle * 180) / Math.PI); }
Math.rad2Deg = function(rad) return (rad / Math.PI) * 180;
function radToDeg(rad) { return rad / Math.PI * 180;
Math.toDegrees = function(radians) { return radians * 180 / Math.PI; };
Number.prototype.toDeg = function() { return this * 180 / Math.PI; Number.prototype.toRad = function() { return this * Math.PI / 180;
Number.prototype.toDeg = function() { return this * 180 / Math.PI;