Skip to content

Commit

Permalink
Reformat examples
Browse files Browse the repository at this point in the history
Work around current limitations in elm-verify-examples (see stoeffel/elm-verify-examples#83)
  • Loading branch information
ianmackenzie committed Mar 26, 2024
1 parent 4c2e853 commit 0d58957
Showing 1 changed file with 9 additions and 18 deletions.
27 changes: 9 additions & 18 deletions src/Float/Extra.elm
Original file line number Diff line number Diff line change
Expand Up @@ -351,11 +351,9 @@ aboutEqual a b =

{-| Check if two values are equal within a given tolerance.
Float.Extra.equalWithin 1e-6 1.9999 2.0001
--> False
Float.Extra.equalWithin 1.0e-6 1.9999 2.0001 --> False
Float.Extra.equalWithin 1e-3 1.9999 2.0001
--> True
Float.Extra.equalWithin 1.0e-3 1.9999 2.0001 --> True
-}
equalWithin : Float -> Float -> Float -> Bool
Expand Down Expand Up @@ -434,30 +432,23 @@ modBy modulus x =
ranges from zero to one. Passing a parameter value of zero will return the start
value and passing a parameter value of one will return the end value.
Float.Extra.interpolateFrom 5 10 0
--> 5
Float.Extra.interpolateFrom 5 10 0 --> 5
Float.Extra.interpolateFrom 5 10 1
--> 10
Float.Extra.interpolateFrom 5 10 1 --> 10
Float.Extra.interpolateFrom 5 10 0.6
--> 8
Float.Extra.interpolateFrom 5 10 0.6 --> 8
The end value can be less than the start value:
Float.Extra.interpolateFrom 10 5 0.1
--> 9.5
Float.Extra.interpolateFrom 10 5 0.1 --> 9.5
Parameter values less than zero or greater than one can be used to extrapolate:
Float.Extra.interpolateFrom 5 10 1.5
--> 12.5
Float.Extra.interpolateFrom 5 10 1.5 --> 12.5
Float.Extra.interpolateFrom 5 10 -0.5
--> 2.5
Float.Extra.interpolateFrom 5 10 -0.5 --> 2.5
Float.Extra.interpolateFrom 10 5 -0.2
--> 11
Float.Extra.interpolateFrom 10 5 -0.2 --> 11
-}
interpolateFrom : Float -> Float -> Float -> Float
Expand Down

0 comments on commit 0d58957

Please sign in to comment.