Package edu.wpi.first.units
Class Per<N extends Unit<N>,D extends Unit<D>>
- Type Parameters:
N
- the type of the numerator unitD
- the type of the denominator unit
public class Per<N extends Unit<N>,D extends Unit<D>> extends Unit<Per<N,D>>
Generic combinatory unit type that represents the proportion of one unit to another, such as
Meters per Second or Radians per Celsius.
Note: Velocity
is used to represent the velocity dimension.
-
Constructor Summary
-
Method Summary
Methods inherited from class edu.wpi.first.units.Unit
convertFrom, equivalent, fromBaseUnits, getConverterFromBase, getConverterToBase, mult, name, of, ofBaseUnits, one, per, per, symbol, toBaseUnits, toString, zero
-
Constructor Details
-
Method Details
-
combine
public static <N extends Unit<N>, D extends Unit<D>> Per<N,D> combine(N numerator, D denominator)Creates a new Per unit derived from an arbitrary numerator and time denominator units. Using a denominator with a unit of time is discouraged; useVelocity
instead.Per.combine(Volts, Meters) // possible PID constant
It's recommended to use the convenience function
Unit.per(Unit)
instead of calling this factory directly.- Type Parameters:
N
- the type of the numerator unitD
- the type of the denominator unit- Parameters:
numerator
- the numerator unitdenominator
- the denominator for unit time- Returns:
- the combined unit
-
numerator
-
denominator
-
equals
-
hashCode
-