@rayyamhk/complex
Version:
A lightweight and easy-to-use library for you to manipulate complex numbers
18 lines (15 loc) • 349 B
JavaScript
;
/**
* Calculates the inverse of the Complex Number.
* @memberof Complex
* @static
* @param {Complex} num - Complex Number
* @returns {number} Inverse of the Complex Number
*/
function inverse(num) {
if (!(num instanceof this)) {
return this.NaN;
}
return this.divide(this.ONE, num);
}
module.exports = inverse;