This commit is contained in:
10
node_modules/licia/isClose.js
generated
vendored
Normal file
10
node_modules/licia/isClose.js
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
var isNum = require('./isNum');
|
||||
exports = function(a, b, relTol, absTol) {
|
||||
if (!isNum(relTol)) relTol = 1e-9;
|
||||
if (!isNum(absTol)) absTol = 0;
|
||||
return abs(a - b) <= max(relTol * max(abs(a), abs(b)), absTol);
|
||||
};
|
||||
var abs = Math.abs;
|
||||
var max = Math.max;
|
||||
|
||||
module.exports = exports;
|
||||
Reference in New Issue
Block a user