@aryth/math
Advanced tools
Comparing version 0.3.18 to 0.3.19
@@ -14,2 +14,3 @@ 'use strict'; | ||
const round = x => x + (x > 0 ? 0.5 : -0.5) << 0; | ||
const constraint = (x, min, max) => x > max ? max : x < min ? min : x; | ||
const E2 = 1E+2; | ||
@@ -48,2 +49,3 @@ const E4 = 1E+4; | ||
exports.almostInt = almostInt; | ||
exports.constraint = constraint; | ||
exports.intAbs = intAbs; | ||
@@ -50,0 +52,0 @@ exports.intExpon = intExpon; |
@@ -10,2 +10,3 @@ const abs = n => n < 0 ? 0 - n : n; | ||
const round = x => x + (x > 0 ? 0.5 : -0.5) << 0; | ||
const constraint = (x, min, max) => x > max ? max : x < min ? min : x; | ||
const E2 = 1E+2; | ||
@@ -38,2 +39,2 @@ const E4 = 1E+4; | ||
export { E2, E4, MILLION, abs, almostEquals, almostInt, intAbs, intExpon, round, roundD1, roundD2, roundD4 }; | ||
export { E2, E4, MILLION, abs, almostEquals, almostInt, constraint, intAbs, intExpon, round, roundD1, roundD2, roundD4 }; |
{ | ||
"name": "@aryth/math", | ||
"version": "0.3.18", | ||
"version": "0.3.19", | ||
"description": "A math util library", | ||
@@ -32,3 +32,3 @@ "main": "dist/index.cjs.js", | ||
"homepage": "https://github.com/hoyeungw/aryth#readme", | ||
"gitHead": "4c78f9496801184a8ed6bf8fa3fd1b06d3b81cf8" | ||
"gitHead": "577f88905f3e56b09bdd5680ecc8d91d68697931" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5503
80