|
|
@ -251,7 +251,7 @@ public final class CameraHelper { |
|
|
|
|
|
|
|
|
|
|
|
double ratio = (double) size.getHeight() / size.getWidth(); |
|
|
|
double ratio = (double) size.getHeight() / size.getWidth(); |
|
|
|
|
|
|
|
|
|
|
|
if (Math.abs(ratio - targetRatio) < MIN_TOLERANCE) MIN_TOLERANCE = ratio; |
|
|
|
if (Math.abs(ratio - targetRatio) < MIN_TOLERANCE) MIN_TOLERANCE = Math.abs(ratio - targetRatio); |
|
|
|
else continue; |
|
|
|
else continue; |
|
|
|
|
|
|
|
|
|
|
|
if (Math.abs(size.getHeight() - targetHeight) < minDiff) { |
|
|
|
if (Math.abs(size.getHeight() - targetHeight) < minDiff) { |
|
|
@ -325,7 +325,7 @@ public final class CameraHelper { |
|
|
|
|
|
|
|
|
|
|
|
double ratio = (double) size.getHeight() / size.getWidth(); |
|
|
|
double ratio = (double) size.getHeight() / size.getWidth(); |
|
|
|
|
|
|
|
|
|
|
|
if (Math.abs(ratio - targetRatio) < MIN_TOLERANCE) MIN_TOLERANCE = ratio; |
|
|
|
if (Math.abs(ratio - targetRatio) < MIN_TOLERANCE) MIN_TOLERANCE = Math.abs(ratio - targetRatio); |
|
|
|
else continue; |
|
|
|
else continue; |
|
|
|
|
|
|
|
|
|
|
|
if (Math.abs(size.getHeight() - targetHeight) < minDiff) { |
|
|
|
if (Math.abs(size.getHeight() - targetHeight) < minDiff) { |
|
|
|