From: Ash Tyndall Date: Sat, 22 Oct 2011 02:24:10 +0000 (+0800) Subject: (no commit message) X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=fdff213d086517ba95a290381e2b72c10113b9ff;p=atyndall%2Fcits2231.git --- diff --git a/scene.c b/scene.c index c4fc167..b043279 100644 --- a/scene.c +++ b/scene.c @@ -308,24 +308,12 @@ void motion(int x, int y) { // For big/small scaling, we map negative numbers to 0->1 and positive numbers to 1->inf float diff = (y - starty); - float map = ( diff + (float)height/2 ) / ( (float)height/2 ); - float scaling; + float scaling = ( diff + (float)height/2 ) / ( (float)height/2 ); - if ( diff < 0 ) { - scaling = map; - } else { - scaling = map; - } - - if ( scaling != 0 ) { - - - sceneObjs[curObject].scale[0] *= scaling; - sceneObjs[curObject].scale[1] *= scaling; - sceneObjs[curObject].scale[2] *= scaling; - printf("Diff is %f, Scaling by %f on all axii, 1/map is %f\n", diff, sceneObjs[curObject].scale[0], map); - - } + sceneObjs[curObject].scale[0] *= scaling; + sceneObjs[curObject].scale[1] *= scaling; + sceneObjs[curObject].scale[2] *= scaling; + printf("Diff is %f, Scaling by %f on all axii, 1/map is %f\n", diff, sceneObjs[curObject].scale[0], scaling); starty = y; }