Quote:
Originally Posted by LoneAngelIbesu
From my experiences with PHP, when using fractions, you might lose float point precision because it's impossible to express some fractions in a finite number of digits. This commonly affects the use of intVal(), which is the PHP equivalent to GS2's int().
From PHP.net website:
Note: floor() is a PHP function that rounds a number down to the whole number closest to zero... which is probably closer to GS2's int() than intVal(), since intVal() accepts a base (defaults to base 10) parameter.
|
Nice theory, except booth floor and intval get 262143/32768 right.