Forum: Multimedia
Delphi
by Namenloser,
21. Jul 2012
Well, take a look at what happens when you fill in your intermediate terms instead of using their results:
(16 - 9) * 1 / (1 - (9 / 16)) = 15,9999 ~ 16
16 * (9 / 16) = 9
So at least the second part will always work, but it’s also completely pointless since you need to know the ratio in advance for it to give the correct result ;)
You really shouldn’t just randomly throw together...
Forum: Multimedia
Delphi
by Namenloser,
21. Jul 2012
It does not work because it does not make any sense.
The ratio X:Y means nothing but the fraction X/Y (“X divided by Y”). You get the ratio by doing this division.
If we do this on a computer, however, the result is naturally going to be a decimal number, e.g. 1.3333 for 400:300. Of course we are not happy with this, because what we wanted was a proper fraction.
So we have to go back to...