public class MiscUtils
extends java.lang.Object
| Constructor and Description |
|---|
MiscUtils() |
| Modifier and Type | Method and Description |
|---|---|
static android.graphics.PointF |
addPoints(android.graphics.PointF p1,
android.graphics.PointF p2) |
static float |
clamp(float number,
float min,
float max) |
static int |
clamp(int number,
int min,
int max) |
static boolean |
contains(float number,
float rangeMin,
float rangeMax) |
static void |
getPathFromData(ShapeData shapeData,
android.graphics.Path outPath) |
static double |
lerp(double a,
double b,
double percentage) |
static float |
lerp(float a,
float b,
float percentage) |
static int |
lerp(int a,
int b,
float percentage) |
static void |
resolveKeyPath(KeyPath keyPath,
int depth,
java.util.List<KeyPath> accumulator,
KeyPath currentPartialKeyPath,
KeyPathElementContent content)
Helper method for any
KeyPathElementContent that will check if the content
fully matches the keypath then will add itself as the final key, resolve it, and add
it to the accumulator list. |
public static android.graphics.PointF addPoints(android.graphics.PointF p1,
android.graphics.PointF p2)
public static void getPathFromData(ShapeData shapeData, android.graphics.Path outPath)
public static float lerp(float a,
float b,
float percentage)
public static double lerp(double a,
double b,
double percentage)
public static int lerp(int a,
int b,
float percentage)
public static int clamp(int number,
int min,
int max)
public static float clamp(float number,
float min,
float max)
public static boolean contains(float number,
float rangeMin,
float rangeMax)
public static void resolveKeyPath(KeyPath keyPath, int depth, java.util.List<KeyPath> accumulator, KeyPath currentPartialKeyPath, KeyPathElementContent content)
KeyPathElementContent that will check if the content
fully matches the keypath then will add itself as the final key, resolve it, and add
it to the accumulator list.
Any KeyPathElementContent should call through to this as its implementation of
KeyPathElement.resolveKeyPath(KeyPath, int, List, KeyPath).