mirror of
https://github.com/josdejong/mathjs.git
synced 2026-01-25 15:07:57 +00:00
1.2 KiB
1.2 KiB
| layout |
|---|
| default |
Function cot #
Calculate the cotangent of a value. cot(x) is defined as 1 / tan(x).
For matrices, the function is evaluated element wise.
Syntax #
math.cot(x)
Parameters #
| Parameter | Type | Description |
|---|---|---|
x |
Number | Boolean | Complex | Unit | Array | Matrix | Function input |
Returns #
| Type | Description |
|---|---|
| Number | Complex | Array | Matrix | Cotangent of x |
Examples #
math.cot(2); // returns Number -0.45765755436028577
1 / math.tan(2); // returns Number -0.45765755436028577