Cyb

Posts: 2726
Registered: 07-02 |
uh,
code:
x += 10;
x /= 1728;
x *= 751;
tada!
you can also do stuff like:
code:
x *= 0.75; //75% of x
x /= 0.5; //double x
but those will only work if x is an int, not fixed point. if x is fixed point (1.2 or something like that) you need to do:
code:
x = fixedmul(x, 0.75);
x = fixeddiv(x, 0.5);
(aside from the last two lines, this is all fairly standard programming stuff avaliable in most (if not all) programming languages, in case you wanted to know or something :P )
|