Merge "Avoid overflow in focus fudge calculation"
This commit is contained in:
@@ -530,7 +530,7 @@ public class FocusFinder {
|
|||||||
* axis distances. Warning: this fudge factor is finely tuned, be sure to
|
* axis distances. Warning: this fudge factor is finely tuned, be sure to
|
||||||
* run all focus tests if you dare tweak it.
|
* 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
|
return 13 * majorAxisDistance * majorAxisDistance
|
||||||
+ minorAxisDistance * minorAxisDistance;
|
+ minorAxisDistance * minorAxisDistance;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user