-- | Create a bounding box from a point that is component-wise @(<=)@ than the
--   other. If this is not the case, then @mempty@ is returned.
fromCorners
  :: (Additive v, Foldable v, Ord n)
  => Point v n -> Point v n -> BoundingBox v n
fromCorners l h
  | F.and (liftI2 (<=) l h) = BoundingBox l h
  | otherwise               = EmptyBox
fromCorners
  :: (Additive v, Foldable v, Ord n)
  => Point v n -> Point v n -> BoundingBox v n
fromCorners l h
  | F.and (liftI2 (<=) l h) = BoundingBox l h
  | otherwise               = EmptyBox
fromCorners l h
  | F.and (liftI2 (<=) l h) = BoundingBox l h
  | otherwise               = EmptyBox