LookaheadFilterInterpreter AccelCurve selection function

Moved the magnitude calcultion for FLING to be with the
other common magnitude calculation so it would be in
one spot.

Extracted the CurveSegment hunting and ratio calculation
into a function. It makes it easier to read and much
easier to verify curves are what is expected.

BUG=b:281873350
TEST=USE="coverage" FEATURES="test noclean" emerge-brya chromeos-base/gestures

Change-Id: I740d6d94809eb48fb43ba3553f7468225fe90605
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/gestures/+/4546782
Code-Coverage: Sean O'Brien <seobrien@chromium.org>
Tested-by: Denis Brockus <dbrockus@chromium.org>
Auto-Submit: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Sean O'Brien <seobrien@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
3 files changed