mirror of
https://gitlab.com/sheaf/metabrush.git
synced 2024-11-05 23:03:38 +00:00
50d99e1e4b
Now we evaluate Bézier curves using an AABB computation. This results in tighter intervals, which means that the cusp-finding algorithm is better behaved.
22 lines
400 B
Haskell
22 lines
400 B
Haskell
{-# LANGUAGE CPP #-}
|
|
|
|
module MetaBrush.Assert
|
|
( assert )
|
|
where
|
|
|
|
-- base
|
|
#ifdef ASSERTS
|
|
import Control.Exception
|
|
( AssertionFailed(..), throw )
|
|
#endif
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
{-# INLINE assert #-}
|
|
assert :: Bool -> String -> a -> a
|
|
#ifdef ASSERTS
|
|
assert False message _ = throw ( AssertionFailed message )
|
|
#else
|
|
assert _ _ a = a
|
|
#endif
|