(no commit message)
authorAsh Tyndall <[email protected]>
Sat, 22 Oct 2011 02:07:41 +0000 (10:07 +0800)
committerAsh Tyndall <[email protected]>
Sat, 22 Oct 2011 02:07:41 +0000 (10:07 +0800)
scene.c

diff --git a/scene.c b/scene.c
index 491943b..8bf5f29 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/map, diff);\r
         }\r
 \r
         if ( scaling != 0 ) {\r

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