Merge "Avoid overflow in focus fudge calculation"

This commit is contained in:
Treehugger Robot
2017-11-15 18:42:28 +00:00
committed by Gerrit Code Review

View File

@@ -530,7 +530,7 @@ public class FocusFinder {
* axis distances. Warning: this fudge factor is finely tuned, be sure to
* run all focus tests if you dare tweak it.
*/
int getWeightedDistanceFor(int majorAxisDistance, int minorAxisDistance) {
long getWeightedDistanceFor(long majorAxisDistance, long minorAxisDistance) {
return 13 * majorAxisDistance * majorAxisDistance
+ minorAxisDistance * minorAxisDistance;
}