Updated README and TODO

pull/2/head
Mark 2023-08-02 11:51:04 -07:00
parent 7a4762df77
commit eb184b934c
Signed by: Mark
GPG Key ID: AD62BB059C2AAEE4
2 changed files with 9 additions and 2 deletions

View File

@ -54,12 +54,20 @@ All documentation is built into the prompt. Use the `help` command to view it.
The conversion operator `to` converts its left argument to the *unit* of its right argument, ignoring its value. For example, `5m to mi` and `5m to 10mi` are identical. The conversion operator `to` converts its left argument to the *unit* of its right argument, ignoring its value. For example, `5m to mi` and `5m to 10mi` are identical.
## Celsius and Fahrenheit
Celsius and Fahrenheit are not supported as first-class units because they require an offset when converting from other temperature units. This leads to ambiguity when adding units, since one temperature must be seen as a *difference* rather than an absolute temperature.
Daisy instead provides four functions (`fromCelsius`, `toCelsius`, `fromFahrenheit`, `toFahrenheit`) which convert between scalars and Kelvin.
- "from" functions take a scalar and return a value in Kelvin: `fromCelsius(0) = 273.15K`
- "to" functions take a value in Kelvin and return a scalar: `toCelsius(273.15 K) = 0`
## Multiplication Order ## Multiplication Order
Implicit multiplication has a higher priority than division. `pi/2 radians` will parse as `pi/(2 radians)`. Type `(pi/2) radians` or `pi/2 * radians` to get 90 degrees. Implicit multiplication has a higher priority than division. `pi/2 radians` will parse as `pi/(2 radians)`. Type `(pi/2) radians` or `pi/2 * radians` to get 90 degrees.
## Inline Assignment ## Inline Assignment
The assignment operator `=` returns its value, and can thus be used inside of an expression. For example, `(a = 2) + 2` assigns `a` to `2` and returns `4`. This only works for variable assignment. The assignment operator `=` returns its value, and can thus be used inside of an expression. For example, `(a = 2) + 2` assigns `a` to `2` and returns `4`. This only works for variable assignment.

View File

@ -3,7 +3,6 @@
- list and delete variables - list and delete variables
- Re-evaluate variables (a = q + 2, q = 3, a should evaluate to 5) - Re-evaluate variables (a = q + 2, q = 3, a should evaluate to 5)
- 2x^-1 as superscript - 2x^-1 as superscript
- Celsius and Farenheit