UNPKG

math-toolbox

Version:

Lightweight and modular math toolbox

13 lines (11 loc) 304 B
/** * The absolute difference between two values. * * @param {number} a - The first value to check. * @param {number} b - The second value to check. * @return {number} The absolute difference between the two values. */ function difference (a, b) { return Math.abs(a - b) } export { difference }