aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Sunet <jeannekamikaze@gmail.com>2012-08-28 22:08:32 +0200
committerMarc Sunet <jeannekamikaze@gmail.com>2012-08-28 22:08:32 +0200
commit6986d06545670b5bef91382a703758ce24131493 (patch)
treee944bfd54df7a90bd47f4e7cdd0a362bfef39897
parent64a19ca92ec41258887c267a8f9c4d62d04c1698 (diff)
Fixed comments
-rw-r--r--Spear/Collision/Collision.hs3
-rw-r--r--Spear/Collision/Collisioner.hs6
2 files changed, 4 insertions, 5 deletions
diff --git a/Spear/Collision/Collision.hs b/Spear/Collision/Collision.hs
index 3a4c614..60c2f03 100644
--- a/Spear/Collision/Collision.hs
+++ b/Spear/Collision/Collision.hs
@@ -57,7 +57,6 @@ instance Collisionable Circle where
57 distance_centers = normSq $ c1 - c2 57 distance_centers = normSq $ c1 - c2
58 sum_radii = (r1 + r2)^2 58 sum_radii = (r1 + r2)^2
59 sub_radii = (r1 - r2)^2 59 sub_radii = (r1 - r2)^2
60
61 60
62 61
63aabbPoints :: AABB -> [Vector2] 62aabbPoints :: AABB -> [Vector2]
@@ -73,7 +72,7 @@ aabbPoints (AABB min max) = [p1,p2,p3,p4,p5,p6,p7,p8]
73 p8 = vec2 (x max) (y max) 72 p8 = vec2 (x max) (y max)
74 73
75 74
76-- | Create the minimal AABB fully containing the specified Sphere. 75-- | Create the minimal box fully containing the specified circle.
77aabbFromCircle :: Circle -> AABB 76aabbFromCircle :: Circle -> AABB
78aabbFromCircle (Circle c r) = AABB bot top 77aabbFromCircle (Circle c r) = AABB bot top
79 where 78 where
diff --git a/Spear/Collision/Collisioner.hs b/Spear/Collision/Collisioner.hs
index af6fee5..19114e6 100644
--- a/Spear/Collision/Collisioner.hs
+++ b/Spear/Collision/Collisioner.hs
@@ -25,12 +25,12 @@ data Collisioner
25 | CircleCol { getSphere :: !Circle } 25 | CircleCol { getSphere :: !Circle }
26 26
27 27
28-- | Create a 'Collisioner' from the specified 'AABB'. 28-- | Create a 'Collisioner' from the specified box.
29aabbCollisioner :: AABB -> Collisioner 29aabbCollisioner :: AABB -> Collisioner
30aabbCollisioner = AABBCol 30aabbCollisioner = AABBCol
31 31
32 32
33-- | Create a 'Collisioner' from the specified 'BSphere'. 33-- | Create a 'Collisioner' from the specified circle.
34sphereCollisioner :: Circle -> Collisioner 34sphereCollisioner :: Circle -> Collisioner
35sphereCollisioner = CircleCol 35sphereCollisioner = CircleCol
36 36
@@ -40,7 +40,7 @@ buildAABB :: [Collisioner] -> AABB
40buildAABB cols = aabb $ generatePoints cols 40buildAABB cols = aabb $ generatePoints cols
41 41
42 42
43-- | Create the minimal 'AABB' collisioner fully containing the specified 'BSphere'. 43-- | Create the minimal 'AABB' collisioner fully containing the specified circle.
44boxFromSphere :: Circle -> Collisioner 44boxFromSphere :: Circle -> Collisioner
45boxFromSphere = AABBCol . aabbFromCircle 45boxFromSphere = AABBCol . aabbFromCircle
46 46