ianmackenzie/elm-units/2.4.0

NOTE: the latest version is 2.10.0

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 =
Quantity Float Ohms
type alias Ohms =
Rate Volts Amperes
ohms : Float -> Resistance

Construct a resistance from a number of ohms.

inOhms : Resistance -> Float

Convert a resistance to a number of ohms.