ianmackenzie/elm-units-prefixed/2.2.0

NOTE: the latest version is 2.8.0

Units.Resistance

A Resistance value represents an electrical resistance in ohms.

Note that since Ohms is defined as Rate Volts Amperes (voltage per unit current), you can construct a Resistance value using Quantity.per:

resistance =
    voltage |> Quantity.per current

You can also do rate-related calculations with Resistance values to compute Voltage or Current:

voltage =
    current |> Quantity.at resistance


current =
    voltage |> Quantity.at_ resistance
type alias Resistance =
Resistance
type alias Ohms =
Ohms
ohms : Float -> Resistance

Construct a resistance from a number of ohms.

inOhms : Resistance -> Float

Convert a resistance to a number of ohms.