triangulate2D :: Vector (V2 Float) -> Vector (V2 Float, V2 Float, V2 Float)
triangulate2D vs
  | V.length vs < 3 = V.empty
  | colinearAll2D vs = V.empty
  | otherwise =
      fmap (\(v1, v2, v3) -> (fromV2 v1, fromV2 v2, fromV2 v3))
    . V.fromList . D.triangulate . V.toList . fmap toV2 $ v2snorm
    where
    (denormVec, v2snorm) = normVecs vs
    toV2 (V2 x y) = Vec.Vector2 (realToFrac x) (realToFrac y)
    fromV2 (Vec.Vector2 x y) = denormVec $ V2 (realToFrac x) (realToFrac y)
triangulate2D :: Vector (V2 Float) -> Vector (V2 Float, V2 Float, V2 Float)
triangulate2D vs
  | V.length vs < 3 = V.empty
  | colinearAll2D vs = V.empty
  | otherwise =
      fmap (\(v1, v2, v3) -> (fromV2 v1, fromV2 v2, fromV2 v3))
    . V.fromList . D.triangulate . V.toList . fmap toV2 $ v2snorm
    where
    (denormVec, v2snorm) = normVecs vs
    toV2 (V2 x y) = Vec.Vector2 (realToFrac x) (realToFrac y)
    fromV2 (Vec.Vector2 x y) = denormVec $ V2 (realToFrac x) (realToFrac y)
triangulate2D vs
  | V.length vs < 3 = V.empty
  | colinearAll2D vs = V.empty
  | otherwise =
      fmap (\(v1, v2, v3) -> (fromV2 v1, fromV2 v2, fromV2 v3))
    . V.fromList . D.triangulate . V.toList . fmap toV2 $ v2snorm
    where
    (denormVec, v2snorm) = normVecs vs
    toV2 (V2 x y) = Vec.Vector2 (realToFrac x) (realToFrac y)
    fromV2 (Vec.Vector2 x y) = denormVec $ V2 (realToFrac x) (realToFrac y)