A Voltage value represents a voltage (electric potential difference, if
we're being picky) in volts.
Note that since Volts is defined as Rate Watts Amperes (power per unit
current), you can do rate-related calculations with Voltage values to compute
Power or Current:
-- elm-units version of 'P = V * I'
power =
current |> Quantity.at voltage
-- I = P / V
current =
power |> Quantity.at_ voltageJust for fun, note that since you can also express Voltage in terms of
Current and Resistance, you could rewrite the second example
above as
-- P = I^2 * R
power =
current
|> Quantity.at
(current
|> Quantity.at resistance
)Construct a voltage from a number of volts.
Convert a voltage to a number of volts.