mathjs
Version:
Math.js is an extensive math library for JavaScript and Node.js. It features a flexible expression parser with support for symbolic computation, comes with a large set of built-in functions and constants, and offers an integrated solution to work with dif
18 lines (17 loc) • 536 B
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.complexEquals = complexEquals;
var _number = require("./number.js");
/**
* Test whether two complex values are equal provided a given epsilon.
* Does not use or change the global Complex.EPSILON setting
* @param {Complex} x
* @param {Complex} y
* @param {number} epsilon
* @returns {boolean}
*/
function complexEquals(x, y, epsilon) {
return (0, _number.nearlyEqual)(x.re, y.re, epsilon) && (0, _number.nearlyEqual)(x.im, y.im, epsilon);
}
;