Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6a05e5a2 authored by Android Build Merger (Role)'s avatar Android Build Merger (Role) Committed by Android (Google) Code Review
Browse files

Merge "Merge "Reduce floating point error in PerimeterPathGuide." into...

Merge "Merge "Reduce floating point error in PerimeterPathGuide." into qt-r1-dev am: 8668e914" into qt-r1-dev-plus-aosp
parents 2cc1da80 ecbe155b
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -287,9 +287,12 @@ public class PerimeterPathGuide {
        float accum = 0;
        for (int i = 0; i < mRegions.length; i++) {
            mRegions[i].normalizedLength = mRegions[i].absoluteLength / perimeterLength;
            accum += mRegions[i].normalizedLength;
            mRegions[i].endCoordinate = accum;
            accum += mRegions[i].absoluteLength;
            mRegions[i].endCoordinate = accum / perimeterLength;
        }
        // Ensure that the last coordinate is 1. Setting it explicitly to avoid floating point
        // error.
        mRegions[mRegions.length - 1].endCoordinate = 1f;
    }

    private CircularCornerPathRenderer.Corner getRotatedCorner(