allwpilib
allwpilib copied to clipboard
Java Units: Add more cases of dimensional analysis for `times()` and `divide()`
This adds/fixes some common cases of dimensional analysis for times()
and divide()
in the Java units library:
-
Dimensionless * U -> U
-
Dimensionless * Per<U, Dimensionless> -> U
-
Time * Velocity<U> -> U
-
Dimensionless / Velocity<U> -> Per<Time, U>
-
Dimensionless / Per<U1, U2> -> Per<U2, U1>
-
Dimensionless / Per<Time, U> -> Velocity<U>
-
U / Time -> Velocity<U>
This does not add dimensional analysis when one of the measurements is a Mult<U1, U2>
.