aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-08-19 12:46:01 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-08-19 12:46:01 -0400
commit69d913a56a56900457d8094de78eed6762e0b79e (patch)
tree074b647fcba6a6823e5858e18fe25a5d0bc467a0
parent4765bb4120716e2c0de9e6517cdb29db1883de2f (diff)
Document `deg`
-rw-r--r--docs/nums.md3
1 files changed, 2 insertions, 1 deletions
diff --git a/docs/nums.md b/docs/nums.md
index 5b258010..151a0aa5 100644
--- a/docs/nums.md
+++ b/docs/nums.md
@@ -4,7 +4,8 @@ Tomo has two floating point number types: `Num` (64-bit, AKA `double`) and
`Num32` (32-bit, AKA `float`). Num literals can have a decimal point (e.g.
`5.`), a scientific notation suffix (e.g. `1e8`) or a percent sign. Numbers
that end in a percent sign are divided by 100 at compile time (i.e. `5% ==
-0.05`).
+0.05`). Numbers can also use the `deg` suffix to represent degrees, which
+are converted to radians at compile time (i.e. `180deg == Nums.PI`).
Nums support the standard math operations (`x+y`, `x-y`, `x*y`, `x/y`) as well as
powers/exponentiation (`x^y`) and modulus (`x mod y` and `x mod1 y`).