- // w: big/small, h: up/down\r
-\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 scaling;\r
-\r
- if ( diff < 0 ) {\r
- scaling = (diff - -((float)height/2))/(0 - -((float)height/2));\r
- } else {\r
- scaling = pow(1.00000010101010100100001115, diff);\r
- }\r
+ // w: big/small\r
+ float diff = (x - startx);\r
+ float max = (float)height/bigsmallFactor;\r
+ float scaling = ( diff + max) / max;\r