cot function

dynamic cot(
  1. dynamic x
)

Returns the cotangent of a number in radians.

Example:

print(cot(1)); // Output: 0.6420926159343308

Example 2:

print(cot(Complex(1, 2))); // Output: 0.032797755533752505 - 0.984329226458191i

Implementation

dynamic cot(dynamic x) {
  return x is num ? 1 / tan(x) : Complex(1, 0) / tan(x);
}