2.2.0
elm-units
2.2.0 brings three main changes: new modules for working with photometric units, support for working with angles in degrees/minutes/seconds form, and a couple new convenience functions for Quantity
values.
Photometric units
This release brings new modules for dealing with different kinds of photometric quantities: SolidAngle
, LuminousFlux
, LuminousIntensity
, Illuminance
and Luminance
. These kinds of quantities can be very confusing to think about - I've tried to describe them briefly in each module's documentation, but if you're new to the field then you'll probably have to do some reading of your own!
Angles in degrees, minutes and seconds
In some situations, such as when dealing with geographical data, it is common to represent angles as a number of degrees, minutes (1/60th of a degree) and seconds (1/60th of a minute). This release brings a handful of functions (and a new Angle.Sign
type) to work with these kinds of values:
Angle.minutes : Float -> Angle
Angle.inMinutes : Angle -> Float
Angle.seconds : Float -> Angle
Angle.inSeconds : Angle -> Float
Angle.fromDms : { sign : Angle.Sign, degrees : Int, minutes : Int, seconds : Float } -> Angle
Angle.toDms : Angle -> { sign : Angle.Sign, degrees : Int, minutes : Int, seconds : Float }
Quantity
convenience functions
A couple tiny convenience functions have been added to the Quantity
module: twice
, as a convenient shorthand for multiplyBy 2
, and half
as shorthand for multiplyBy 0.5
.