UNPKG

@dulysse1/better-node

Version:

Improve Node types & add object properties

14 lines (13 loc) 278 B
try { Object.defineProperty(global.Math, "degrees", { value: function (rad) { if (typeof rad !== "number") { throw new Error("TypeError: rad value should be a number."); } return rad * (180 / this.PI); }, }); } catch (error) { void 0; } module.exports = {};