laying out data
This commit is contained in:
parent
01c152c1a5
commit
c574671244
1 changed files with 8 additions and 1 deletions
|
@ -67,7 +67,14 @@ class (Show c, Mass c) => Collidible c where
|
||||||
-> other -- ^ second object
|
-> other -- ^ second object
|
||||||
-> CollisionResult Double (V2 Int) -- ^ Do the objects collide?
|
-> CollisionResult Double (V2 Int) -- ^ Do the objects collide?
|
||||||
collisionCheck m1 m2 =
|
collisionCheck m1 m2 =
|
||||||
error "collisionCheck: not yet implemented!"
|
let p1@(V2 p1x p1y) = position m1
|
||||||
|
p2@(V2 p2x p2y) = position m2
|
||||||
|
v1@(V2 v1x v1y) = velocity m1
|
||||||
|
v2@(V2 v2x v2y) = velocity m2
|
||||||
|
(V2 dvx dvy) = v1 - v2
|
||||||
|
(V2 dx dy) = p1 - p2
|
||||||
|
in
|
||||||
|
error "collisionCheck: Not yet implemented!"
|
||||||
|
|
||||||
-- | This Function is called for every collision on both colliding objects.
|
-- | This Function is called for every collision on both colliding objects.
|
||||||
collide
|
collide
|
||||||
|
|
Loading…
Reference in a new issue