Class Voltage

java.lang.Object
edu.wpi.first.units.Unit<Voltage>
edu.wpi.first.units.Voltage

public class Voltage
extends Unit<Voltage>
Unit of electric voltage dimension.

This is the base type for units of voltage dimension. It is also used to specify the dimension for Measure: Measure<Voltage>.

Actual units (such as Units.Volts and Units.Millivolts) can be found in the Units class.

  • Method Details

    • times

      public Power times​(Unit<Current> current, String name, String symbol)
      Constructs a unit of power equivalent to this unit of voltage multiplied by another unit of electrical current. For example, Volts.times(Amps) will return a unit of power equivalent to one Watt; Volts.times(Milliams) will return a unit of power equivalent to a milliwatt, and so on.
      Parameters:
      current - the current unit to multiply by
      name - the name of the resulting unit of power
      symbol - the symbol used to represent the unit of power
      Returns:
      the power unit