UNPKG

es-next-tools

Version:

A comprehensive utility library for JavaScript and TypeScript that provides a wide range of functions for common programming tasks, including mathematical operations, date manipulations, array and object handling, string utilities, and more.

12 lines (11 loc) 267 B
/** * Converts degrees to radians. * @param {number} deg - The angle in degrees. * @returns {number} The angle converted to radians. * @example * const radians = dtr(180); // 3.141592653589793 */ export function dtr(deg) { return (deg * Math.PI) / 180; } ;