(no commit message)
[atyndall/cits2231.git] / scene.c
diff --git a/scene.c b/scene.c
index 491943b..fcbda4a 100644 (file)
--- a/scene.c
+++ b/scene.c
@@ -308,12 +308,13 @@ void motion(int x, int y) {
 \r
         // For big/small scaling, we map negative numbers to 0->1 and positive numbers to 1->inf\r
         float diff = (y - starty);\r
+        float map = (diff - -((float)height/2))/(0 - -((float)height/2));\r
         float scaling;\r
 \r
         if ( diff < 0 ) {\r
-          scaling = (diff - -((float)height/2))/(0 - -((float)height/2));\r
+          scaling = map;\r
         } else {\r
-          scaling = pow(1.00000010101010100100001115, diff);\r
+          scaling = pow(1.0/map, diff);\r
         }\r
 \r
         if ( scaling != 0 ) {\r

UCC git Repository :: git.ucc.asn.au