Currently the mod operator ignores all units on the RHS, this is not correct.
Consider the following case:
This would currently output 1.01km. Instead, these are the steps that should've been taken:
1.01km mod 100meters = 1.01km mod 0.1km = 0.01km
So unit conversion should be taking place, just like with subtraction. Modulo essentially represents: if I repeatedly subtract the RHS, what is the last value before getting a negative number. So it makes sense that units should be converted in the same way as with subtraction.
Currently the mod operator ignores all units on the RHS, this is not correct.
Consider the following case:
This would currently output
1.01km. Instead, these are the steps that should've been taken:So unit conversion should be taking place, just like with subtraction. Modulo essentially represents: if I repeatedly subtract the RHS, what is the last value before getting a negative number. So it makes sense that units should be converted in the same way as with subtraction.