aboutsummaryrefslogtreecommitdiff
path: root/Graphics/Glyph/Util.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Graphics/Glyph/Util.hs')
-rw-r--r--Graphics/Glyph/Util.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/Graphics/Glyph/Util.hs b/Graphics/Glyph/Util.hs
index e8a5974..21e219a 100644
--- a/Graphics/Glyph/Util.hs
+++ b/Graphics/Glyph/Util.hs
@@ -320,3 +320,5 @@ mix a b c = a * c + b * (1 - c)
fpart :: (RealFrac a) => a -> a
fpart x = x - (fromIntegral (floor x::Int))
+ifNaN :: (RealFloat a) => a -> a -> a
+ifNaN reg def = if' (isNaN reg) def reg