UNPKG

@technobuddha/library

Version:
17 lines (16 loc) 457 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.toRadians = void 0; var _angle_1 = require("../_angle"); /** * Converts degrees to radians. * * @param angle Angle in degrees. * @return Angle in radians. */ function toRadians(angle, unit) { if (unit === void 0) { unit = 'degrees'; } return _angle_1.units.radians * angle / _angle_1.units[unit]; } exports.toRadians = toRadians; exports.default = toRadians;