Skip to content

Trigonometry — sin, cos, tan, asin, acos, atan

What it does: Trigonometric functions over angle m in degrees (Blockly convention). In MicroPython, values are internally converted to radians. It can tell you how tall or long a triangle is if you know the angle, or find the angle if you know the number.

function sin, cos, tan, asin, acos, atan

In MicroPython, everything is calculated in radians, but ESP IDE automatically converts it to degrees (Blockly convention).

Inputs

  • NUMBER: angle in degrees.

Math operations

  • SIN, COS, TAN, ASIN, ACOS, ATAN

Output

  • NUMBER

Tips

  • Inverse function values (ASIN, ACOS, ATAN) return the angle in degrees.
  • Beware of tan(90° + k·180°) — not defined (asymptotes).