summaryrefslogtreecommitdiffstats
path: root/src/Render.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Render.hs')
-rw-r--r--src/Render.hs18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/Render.hs b/src/Render.hs
index a5f5ae9..839859e 100644
--- a/src/Render.hs
+++ b/src/Render.hs
@@ -100,10 +100,10 @@ render = do
vertex $ Vertex2 (0 :: GLfloat) (0 :: GLfloat)
forM_ tanklist $ \tank -> unsafePreservingMatrix $ do
- let x = fromReal . tankX $ tank
- y = fromReal . tankY $ tank
- rotDir = fromReal . tankDir $ tank
- rotAim = fromReal . tankAim $ tank
+ let x = realToFrac . tankX $ tank
+ y = realToFrac . tankY $ tank
+ rotDir = realToFrac . tankDir $ tank
+ rotAim = realToFrac . tankAim $ tank
translate $ Vector3 x y (0 :: GLfloat)
rotate rotDir $ Vector3 0 0 (1 :: GLfloat)
@@ -141,9 +141,9 @@ render = do
vertex $ Vertex2 (0.5 :: GLfloat) (-0.5 :: GLfloat)
forM_ bulletlist $ \bullet -> unsafePreservingMatrix $ do
- let x = fromReal . bulletX $ bullet
- y = fromReal . bulletY $ bullet
- rotDir = fromReal . bulletDir $ bullet
+ let x = realToFrac . bulletX $ bullet
+ y = realToFrac . bulletY $ bullet
+ rotDir = realToFrac . bulletDir $ bullet
translate $ Vector3 x y (0 :: GLfloat)
rotate rotDir $ Vector3 0 0 (1 :: GLfloat)
@@ -162,7 +162,3 @@ render = do
texCoord $ TexCoord2 (1 :: GLfloat) (0 :: GLfloat)
vertex $ Vertex2 (0.1 :: GLfloat) (-0.1 :: GLfloat)
-
-
-fromReal :: (Real a, Fractional b) => a -> b
-fromReal = fromRational . toRational \ No newline at end of file