Here you can find the source of toRad()
/* script using harvesine formula to calculate the greatest circle distance bt two points */ Number.prototype.toRad = function() { return this * Math.PI / 180; };
Math.degToRad = function(degrees){ return degrees * Math.PI / 180; };
Number.prototype.toRad = function() { return this * Math.PI / 180;
Number.prototype.toRad = function() { return this * Math.PI / 180; Number.prototype.toDeg = function() { return this * 180 / Math.PI;
Number.prototype.toRad = function() { return this * Math.PI / 180; }; Number.prototype.toDegree = function() { return this / Math.PI * 180; };
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(); ...
Number.prototype.toRad = function() { return (this / 180) * Math.PI; };
Number.prototype.toRad = function() { return this * Math.PI / 180;
Number.prototype.toRadians = function() { return (this / 360) * 2 * Math.PI;
Number.prototype.toRadians = function() { return this * Math.PI / 180;