opensolid/geometry/1.0.1

NOTE: this package is not compatible with Elm 0.19.1

OpenSolid.Scalar

Convenience functions for working with scalar (floating-point) values.

equalWithin : Float -> Float -> Float -> Bool

Check if two values are equal within a given tolerance.

Scalar.equalWithin 1e-6 1.9999 2.0001 ==
    False


Scalar.equalWithin 1e-3 1.9999 2.0001 ==
    True