A trait to generalise the notion of signed_error between two
measurements.
For example, between displacement measurements of -10 and 20
there is a signed_error of -30 which is calculated as (-10) - (20). However this subtraction does not work for other
measurements, take for example rotation measurements represented
in radians, imagine the signed_error between a measurement of
2*PI and 4*PI. Using the subtraction method would give us an
signed_error of -2*PI which may not be expected if we consider
2*PI and 4*PI to be equivalent and hence expect a
signed_error of 0.
Hence, this trait allows you to implement your own method of
calculating the signed_error between two measurements.
A implementation of the regular subtraction method which is
commonly most appropriate is provided via [RegularSignedError].
Feel free to ignore the PR, I offer the changes in case others feel they are useful.
Actually, I think you can just make a newtype and implement core::ops::Sub on it with the required SignedError behaviour rather than making a new trait.
Quoting added docs in the PR:
Feel free to ignore the PR, I offer the changes in case others feel they are useful.