you could also put this into your bootstrap: /** * Can compare two float values * @link http://php.net/manual/en/language.types.float.php * @return boolean */ function isFloatEqual($x, $y, $precision = 0.0000001) { return ($x+$precision >= $y) && ($x-$precision <= $y); }
On 21 Dez., 03:40, José Lorenzo <jose....@gmail.com> wrote: > Comparing floats in PHP is super annoying, go to the line that is comparing > those 2 numbers and cast both values as string. > > $this->assertEqual((string) $value1, (string) $value2); -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php