diff options
author | Jörn Friedrich Dreyer <jfd@butonic.de> | 2014-04-02 17:32:27 +0200 |
---|---|---|
committer | Jörn Friedrich Dreyer <jfd@butonic.de> | 2014-04-02 17:32:27 +0200 |
commit | b8248f4a0acf0de228774aec0f7150a538ed09e6 (patch) | |
tree | c7537d7bddd9ed405adb1ac67c3c646931e7ea1a /lib | |
parent | 16d10844cd01dc89f864cda6bde5169812e89b62 (diff) | |
download | nextcloud-server-b8248f4a0acf0de228774aec0f7150a538ed09e6.tar.gz nextcloud-server-b8248f4a0acf0de228774aec0f7150a538ed09e6.zip |
compare floats with epsilon
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/private/preview.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/preview.php b/lib/private/preview.php index 0c1af3c9588..963cda66992 100755 --- a/lib/private/preview.php +++ b/lib/private/preview.php @@ -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; } |