Calculate the cotangent of any angle in degrees or radians, with pole detection.
The cotangent is the reciprocal of tangent: cot(θ) = cos(θ)/sin(θ) = adjacent/opposite. It is undefined at multiples of 180° where sin = 0. The default input avoids poles.
Cotangent definition
cot θ = cos θ / sin θ = 1 / tan θ
cot(θ) = cos(θ)/sin(θ). At 0°, sin = 0, so we divide by zero. The asymptotes are at 0°, 180°, 360°, etc.
cot(45°) = 1, since it is 1/tan(45°) = 1/1 = 1.