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

Commit 09c4bf8d authored by Lucas Dupin's avatar Lucas Dupin
Browse files

MathUtils.map fix

Test: runtest -x cts/tests/tests/util/src/android/util/cts/MathUtilsTest.java
Bug: 62068907
Change-Id: I26613407a2f477580cbe17160651f1f8972a75d8
parent ced004da
Loading
Loading
Loading
Loading
+1 −3
Original line number Original line Diff line number Diff line
@@ -16,8 +16,6 @@


package android.util;
package android.util;


import java.util.Random;

/**
/**
 * A class that contains utility methods related to numbers.
 * A class that contains utility methods related to numbers.
 *
 *
@@ -181,7 +179,7 @@ public final class MathUtils {
    }
    }


    public static float map(float minStart, float minStop, float maxStart, float maxStop, float value) {
    public static float map(float minStart, float minStop, float maxStart, float maxStop, float value) {
        return maxStart + (maxStart - maxStop) * ((value - minStart) / (minStop - minStart));
        return maxStart + (maxStop - maxStart) * ((value - minStart) / (minStop - minStart));
    }
    }


    /**
    /**