---
id: math-tan
name: Math.tan
category: math
kind: namespace-method
tokens: Math.tan
sig: Math.tan(radians) -> fixed
tip: Tangent of an angle in radians.
order: 14
ns: Math
member: tan
---
Returns the tangent of radians, computed as Math.sin(radians) / Math.cos(radians) in fixed-point. Near odd multiples of pi/2 the cosine approaches zero and the result grows without bound, so guard those angles. For most gameplay, Math.sin/Math.cos are what you want; tan is here for slopes and field-of-view math.
```ludic
program Demo {
handler Step phase Update {
let slope = Math.tan(pitch)
}
}
```