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) 257 B
/** * Converts radians to degrees. * @param {number} rad - The angle in radians. * @returns {number} The angle converted to degrees. * @example * const degrees = rtd(Math.PI); // 180 */ export function rtd(rad) { return (rad * 180) / Math.PI; } ;