@rayyamhk/complex
Version:
A lightweight and easy-to-use library for you to manipulate complex numbers
17 lines (15 loc) • 483 B
JavaScript
;
/**
* Calculates the cotangent of a Complex Number.
* The domain of this function is C / { kπ/2 : k is any integer }.<br><br>
*
* If the argument is out of its domain, it returns Complex.NaN.
* @memberof Complex
* @static
* @param {Complex} num - Any Complex Number which is not the multiple of π/2
* @returns {Complex} The result of cotangent function
*/
function cot(num) {
return this.divide(this.ONE, this.tan(num));
}
module.exports = cot;