compare floats with epsilon
This commit is contained in:
parent
16d10844cd
commit
b8248f4a0a
|
@ -355,7 +355,8 @@ class Preview {
|
|||
$y = (int)$size[1];
|
||||
|
||||
$aspectRatio = (float)($x / $y);
|
||||
if ($aspectRatio !== $wantedAspectRatio) {
|
||||
$epsilon = 0.000001;
|
||||
if (($aspectRatio - $wantedAspectRatio) >= $epsilon) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue