Allow tweaking z buffer when rendering polygon, improve explosion render

This commit is contained in:
jgk
2021-07-03 23:56:01 +02:00
parent 532f491327
commit 9df19a9e85
33 changed files with 339 additions and 82 deletions
+2 -4
View File
@@ -115,12 +115,10 @@ Identical to detV. -}
crossV :: Point2 -> Point2 -> Float
crossV (ax,ay) (bx,by) = ax*by - ay*bx
{- | TO CHECK Orthographic projection of one vector onto another. -}
projV
:: Point2
-> Point2
-> Point2
projV :: Point2 -> Point2 -> Point2
projV fromv onv
| den == 0 = error "tried projecting onto zero vector"
| otherwise = (fromv `dotV` onv) / den *.* onv
where
den = onv `dotV` onv