I was trying to figure out how to do a mod in CL.
In the calculator/graph, I think you can use mod(x,5)
Most languages I know use the % sign: example x % 5
Both of these so if a variable reaches the argument is “recycles to 0”.
Maybe there’s a documentation page somewhere related to this but couldn’t find it.
There’s a shorter way using numericValue, but interpolating the numeric values as a string can lead to some errors depending on the Possible input values
#Changes label on point A to the modulus of a divided by b
mod = simpleFunction("\mod(a,b)",“a”,“b”)
pointLabel(“A”):"${mod.evaluateAt(numericValue(exp1.content),numericValue(exp2.content))}"
More lines, but looks less complicated to me. *shrug
Also, “.content”? Normally I’d use “.latex” or just numericValue(exp1), but guess it doesn’t matter.