UNPKG

@princedev/calculate

Version:

Fast, lightweight, and extinsible mathematical and statistical functions.

21 lines (20 loc) 411 B
/** * @name negate * @summary Returns the negated value. * * @description Returns a same number with an opposite sign. * * @example * // Normal usage * let result = negate(2); * // => -2 * * let result = negate(-4); * // => 4 * * @param {number} a given number. * @returns {number} the negated value * * @function pure */ export default function negate(a: number): number;