mirror of
https://github.com/josdejong/mathjs.git
synced 2026-01-25 15:07:57 +00:00
1.3 KiB
1.3 KiB
| layout |
|---|
| default |
Function cot #
Calculate the cotangent of a value. Defined as cot(x) = 1 / tan(x).
To avoid confusion with the matrix cotangent, this function does not apply to matrices.
Syntax #
math.cot(x)
Parameters #
| Parameter | Type | Description |
|---|---|---|
x |
number | Complex | Unit | Array | Matrix | Function input |
Returns #
| Type | Description |
|---|---|
| number | Complex | Array | Matrix | Cotangent of x |
Throws #
| Type | Description |
|---|
Examples #
math.cot(2) // returns number -0.45765755436028577
1 / math.tan(2) // returns number -0.45765755436028577