UNPKG

everyutil

Version:

A comprehensive library of lightweight, reusable utility functions for JavaScript and TypeScript, designed to streamline common programming tasks such as string manipulation, array processing, date handling, and more.

9 lines (8 loc) 321 B
/** * Normalizes an angle to [0, 360) or [-π, π). * @author @dailker * @param {number} angle - The angle to normalize. * @param {'deg'|'rad'} [unit='deg'] - Unit: 'deg' or 'rad'. * @returns {number} Normalized angle. */ export declare function normalizeAngle(angle: number, unit?: 'deg' | 'rad'): number;