mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 08:16:49 +00:00
Extract PreviewPositionHelper to shared library
Moves Launcher's PreviewPositionHelper to shared library between SystemUI and Launcher to reuse it in the future in the partial screensharing recents selector. There should be no functional changes in the code itself. Bug: 240924926 Test: presubmit Change-Id: Ib38b6f9db91e63a2598bf81229e3cd3e1a49ca60
This commit is contained in:
@@ -818,16 +818,6 @@ public final class Utilities {
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Compares the ratio of two quantities and returns whether that ratio is greater than the
|
||||
* provided bound. Order of quantities does not matter. Bound should be a decimal representation
|
||||
* of a percentage.
|
||||
*/
|
||||
public static boolean isRelativePercentDifferenceGreaterThan(float first, float second,
|
||||
float bound) {
|
||||
return (Math.abs(first - second) / Math.abs((first + second) / 2.0f)) > bound;
|
||||
}
|
||||
|
||||
/**
|
||||
* Rotates `inOutBounds` by `delta` 90-degree increments. Rotation is visually CCW. Parent
|
||||
* sizes represent the "space" that will rotate carrying inOutBounds along with it to determine
|
||||
|
||||
Reference in New Issue
Block a user