danielnarey/elm-toolkit/6.2.0

NOTE: this package is not compatible with Elm 0.19.1

Toolkit.Float

Helpers for working with Float values

Rounding

roundTo : Int -> Float -> Float

Round a Float to a given number of decimal places

pi
  |> roundTo 2


--> 3.14


pi
  |> roundTo 0


--> 3


1234
  |> roundTo -2


--> 1200