overhaul operator precedence

arithmetic operators now have the same precedence.
if you want them to bind tighter, you remove the spaces around them:

- 2 + 2 * 2 = 8
- 2 + 2*2 = 6
This commit is contained in:
りき萌 2025-09-01 21:13:32 +02:00
parent 09f2292e62
commit b52c1b26c9
4 changed files with 144 additions and 43 deletions

View file

@ -76,9 +76,9 @@ wavelength: 1
withDotter \\d ->
pi = 3.14159265
a = (sin (d Num * wavelength / pi) + 1) / 2
a = sin (d Num * wavelength / pi) + 1 / 2
range = maxThickness - minThickness
thickness = minThickness + a * range
thickness = a * range + minThickness
stroke thickness color (line (d From) (d To))
`.trim(),
},