From 69d913a56a56900457d8094de78eed6762e0b79e Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 19 Aug 2024 12:46:01 -0400 Subject: Document `deg` --- docs/nums.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'docs/nums.md') 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`). -- cgit v1.2.3