From: Ash Tyndall Date: Sat, 22 Oct 2011 01:44:33 +0000 (+0800) Subject: (no commit message) X-Git-Url: https://git.ucc.asn.au/?p=atyndall%2Fcits2231.git;a=commitdiff_plain;h=d9984149cebb3cf1bdbd2a5c89c8d7572c4b31d4 --- diff --git a/scene.c b/scene.c index 5fb2e79..2cfafa1 100644 --- a/scene.c +++ b/scene.c @@ -308,6 +308,8 @@ 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); + if ( diff < 0 ) diff--; + if ( diff > 0 ) diff++; float scaling; if ( diff < 0 ) {