You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the mod operator ignores all units on the RHS, this is not correct.
Consider the following case:
1.01km mod 100meters
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: