1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:37:43 +00:00

LibJS: Add Math.exp()

This commit is contained in:
Linus Groh 2020-05-18 15:11:15 +01:00 committed by Andreas Kling
parent b27834cf16
commit e375766f98
5 changed files with 48 additions and 12 deletions

View file

@ -50,3 +50,11 @@ function assertThrowsError(testFunction, options) {
}
}
/**
* Check whether the difference between two numbers is less than 0.000001.
* @param {Number} a First number
* @param {Number} b Second number
*/
function isClose(a, b) {
return Math.abs(a - b) < 0.000001;
}