mirror of
https://gitlab.com/sheaf/metabrush.git
synced 2024-12-25 14:54:06 +00:00
13 lines
330 B
Haskell
13 lines
330 B
Haskell
|
{-# LANGUAGE ScopedTypeVariables #-}
|
||
|
|
||
|
module Math.Epsilon
|
||
|
( epsilon )
|
||
|
where
|
||
|
|
||
|
--------------------------------------------------------------------------------
|
||
|
|
||
|
{-# SPECIALISE epsilon :: Float #-}
|
||
|
{-# SPECIALISE epsilon :: Double #-}
|
||
|
epsilon :: forall r. RealFloat r => r
|
||
|
epsilon = encodeFloat 1 ( 5 - floatDigits ( 0 :: r ) )
|