Think this is the right forum for this....
I'm writing up a script for my track info panel and there are one or two things I'm trying to do involving division that just aren't working, because foobar's $div() method drops all decimal places, and $mul() ignores them!
Random examples:
$div(3,2) : That should spit out 1.5. Instead, it gives 1.
$div(9,5) : Should be 1.8. Again, it displays 1.
$mul(9,1.5) : Gives 9, where it should be 13.5.
$div() obviously just removes anything after decimal points, and because of this my track %age played indicator doesn't work (it shows 0%, all the way up to the end of the track, where it shows 100%, because halfway through the calculation the number is as a decimal - eg. 80% has the track percentage as 0.8 at a point). Likewise, I have a method that calculates the filesize from the number of bytes using some division - because of the dropping of decimal places, it reports an inaccurate size. $mul(), by displaying 9, is just ignoring the .5 after it. I've tried with various numbers, I'm positive this is what it's doing.
Are there any division and multiplication methods, compatible with foobar 0.8.3 scripting (yeah, yeah. I'm not upgrading to 0.9 until certain plugins I need are ported), that support decimal places, or will I have to wait until 0.9 (or beyond!) for this?
Thanks.