ianmackenzie/elm-units/1.0.0

NOTE: the latest version is 2.10.0

Area

An Area represents an area in square meters, square feet, acres, hectares etc. It is stored as a number of square meters.

Note that you can construct an Area value directly using the functions in this module, but it also works to call Quantity.squared on a Length or Quantity.product on a pair of Lengths. The following are all equivalent:

Area.squareFeet 100


Quantity.squared (Length.feet 10)


Quantity.product (Length.feet 25) (Length.feet 4)
type alias Area =
Quantity Float SquareMeters

Metric

squareMeters : Float -> Area

Construct an area from a number of square meters.

inSquareMeters : Area -> Float

Convert an area to a number of square meters.

squareMillimeters : Float -> Area

Construct an area from a number of square millimeters.

inSquareMillimeters : Area -> Float

Convert an area to a number of square millimeters.

squareCentimeters : Float -> Area

Construct an area from a number of square centimeters.

inSquareCentimeters : Area -> Float

Convert an area to a number of square centimeters.

hectares : Float -> Area

Construct an area from a number of hectares.

inHectares : Area -> Float

Convert an area to a number of hectares.

squareKilometers : Float -> Area

Construct an area from a number of square kilometers.

inSquareKilometers : Area -> Float

Convert an area to a number of square kilometers.

Imperial

squareInches : Float -> Area

Construct an area from a number of square inches.

inSquareInches : Area -> Float

Convert an area to a number of square inches.

squareFeet : Float -> Area

Construct an area from a number of square feet.

inSquareFeet : Area -> Float

Convert an area to a number of square feet.

squareYards : Float -> Area

Construct an area from a number of square yards.

inSquareYards : Area -> Float

Convert an area to a number of square yards.

acres : Float -> Area

Construct an area from a number of acres.

inAcres : Area -> Float

Convert an area to a number of acres.

squareMiles : Float -> Area

Construct an area from a number of square miles.

inSquareMiles : Area -> Float

Convert an area to a number of square miles.