feat:node-modules

This commit is contained in:
houjunxiang
2025-11-24 10:26:18 +08:00
parent 753766893b
commit 8a3e48d856
8825 changed files with 567399 additions and 1 deletions

14
node_modules/mathjs/lib/esm/utils/complex.js generated vendored Normal file
View File

@@ -0,0 +1,14 @@
import { nearlyEqual } from './number.js';
/**
* Test whether two complex values are equal provided a given relTol and absTol.
* Does not use or change the global Complex.EPSILON setting
* @param {Complex} x - The first complex number for comparison.
* @param {Complex} y - The second complex number for comparison.
* @param {number} relTol - The relative tolerance for comparison.
* @param {number} absTol - The absolute tolerance for comparison.
* @returns {boolean} - Returns true if the two complex numbers are equal within the given tolerances, otherwise returns false.
*/
export function complexEquals(x, y, relTol, absTol) {
return nearlyEqual(x.re, y.re, relTol, absTol) && nearlyEqual(x.im, y.im, relTol, absTol);
}