Calculate
calculateEvaluate arithmetic exactly instead of estimating: + - * / % ^, parentheses, pi, trigonometry in radians (rad() and deg() convert), sqrt, abs, min, max, round, floor, ceil, clamp, lerp, pow, hypot, atan2, ln, log10, exp. Give one expression (returns result), named expressions that can use earlier names (returns each by name), or an expression over a series of a variable (returns values as [x, y] pairs, up to 2000 steps). Answers are rounded to 6 decimal places, and a malformed expression is refused with the reason. Free, read-only, no design needed. Use it for sizes, positions and angles, and for colour contrast with the formula in design_guide; for positions of many items use place_items, for start times stagger_times.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| intent | No | Optional: a few words on why. | |
| series | No | Evaluate `expression` over a range of one variable instead. | |
| variables | No | Values for names used in the expressions. | |
| expression | No | One expression, e.g. "1080 / 3 - 24" or "sin(rad(30)) * r". | |
| expressions | No | Several named expressions at once; later ones may use earlier names. |