-
public class MiscUtils
-
-
Method Summary
Modifier and Type Method Description static PointFaddPoints(PointF p1, PointF p2)static voidgetPathFromData(ShapeData shapeData, Path outPath)static floatlerp(float a, float b, @FloatRange(from = 0f, to = 1f) float percentage)static doublelerp(double a, double b, @FloatRange(from = 0f, to = 1f) double percentage)static intlerp(int a, int b, @FloatRange(from = 0f, to = 1f) float percentage)static intclamp(int number, int min, int max)static floatclamp(float number, float min, float max)static doubleclamp(double number, double min, double max)static booleancontains(float number, float rangeMin, float rangeMax)static voidresolveKeyPath(KeyPath keyPath, int depth, List<KeyPath> accumulator, KeyPath currentPartialKeyPath, KeyPathElementContent content)Helper method for any KeyPathElementContent that will check if the contentfully matches the keypath then will add itself as the final key, resolve it, and addit to the accumulator list. -
-
Method Detail
-
getPathFromData
static void getPathFromData(ShapeData shapeData, Path outPath)
-
lerp
static float lerp(float a, float b, @FloatRange(from = 0f, to = 1f) float percentage)
-
lerp
static double lerp(double a, double b, @FloatRange(from = 0f, to = 1f) double percentage)
-
lerp
static int lerp(int a, int b, @FloatRange(from = 0f, to = 1f) float percentage)
-
clamp
static int clamp(int number, int min, int max)
-
clamp
static float clamp(float number, float min, float max)
-
clamp
static double clamp(double number, double min, double max)
-
contains
static boolean contains(float number, float rangeMin, float rangeMax)
-
resolveKeyPath
static void resolveKeyPath(KeyPath keyPath, int depth, List<KeyPath> accumulator, KeyPath currentPartialKeyPath, KeyPathElementContent content)
Helper method for any KeyPathElementContent that will check if the contentfully matches the keypath then will add itself as the final key, resolve it, and addit to the accumulator list.
Any KeyPathElementContent should call through to this as its implementation of resolveKeyPath.
-
-
-
-