Spaces:
Paused
Paused
Download node_modules/almost-equal/almost_equal.js from Leon4gr45/UserSyncFrontend: direct link, hf CLI and curl.
- Browser
- Download file 548 Bytes
-
https://huggingface.co/spaces/Leon4gr45/UserSyncFrontend/resolve/main/node_modules/almost-equal/almost_equal.js
- Command line
-
hf download hf://spaces/Leon4gr45/UserSyncFrontend/node_modules/almost-equal/almost_equal.js
-
curl -L -o almost_equal.js https://huggingface.co/spaces/Leon4gr45/UserSyncFrontend/resolve/main/node_modules/almost-equal/almost_equal.js
548 Bytes
| var abs = Math.abs | |
| , min = Math.min | |
| function almostEqual(a, b, absoluteError, relativeError) { | |
| var d = abs(a - b) | |
| if (absoluteError == null) absoluteError = almostEqual.DBL_EPSILON; | |
| if (relativeError == null) relativeError = absoluteError; | |
| if(d <= absoluteError) { | |
| return true | |
| } | |
| if(d <= relativeError * min(abs(a), abs(b))) { | |
| return true | |
| } | |
| return a === b | |
| } | |
| almostEqual.FLT_EPSILON = 1.19209290e-7 | |
| almostEqual.DBL_EPSILON = 2.2204460492503131e-16 | |
| module.exports = almostEqual | |