Allow tweaking z buffer when rendering polygon, improve explosion render
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user