public class MathUtils
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static void |
computeNewPosition(float[] point,
State initialState,
State finalState) |
static float |
interpolate(float start,
float end,
float factor)
Interpolates from start value to the end one by given factor (from 0 to 1).
|
static void |
interpolate(android.graphics.RectF out,
android.graphics.RectF start,
android.graphics.RectF end,
float factor)
Interpolates from start rect to the end rect by given factor (from 0 to 1),
storing result into out rect.
|
static void |
interpolate(State out,
State start,
float startPivotX,
float startPivotY,
State end,
float endPivotX,
float endPivotY,
float factor)
Interpolates from start state to end state by given factor (from 0 to 1),
storing result into out state.
|
static void |
interpolate(State out,
State start,
State end,
float factor)
Interpolates from start state to end state by given factor (from 0 to 1),
storing result into out state.
|
static float |
restrict(float value,
float minValue,
float maxValue)
Keeps value within provided bounds.
|
public static float restrict(float value,
float minValue,
float maxValue)
value - Value to be restrictedminValue - Min valuemaxValue - Max valuepublic static float interpolate(float start,
float end,
float factor)
start - Start valueend - End valuefactor - Factorpublic static void interpolate(android.graphics.RectF out,
android.graphics.RectF start,
android.graphics.RectF end,
float factor)
out - Interpolated rectangle (output)start - Start rectangleend - End rectanglefactor - Factorpublic static void interpolate(State out, State start, State end, float factor)
out - Interpolated state (output)start - Start stateend - End statefactor - Factorpublic static void interpolate(State out, State start, float startPivotX, float startPivotY, State end, float endPivotX, float endPivotY, float factor)
out - Interpolated state (output)start - Start statestartPivotX - Pivot point's X coordinate in start state coordinatesstartPivotY - Pivot point's Y coordinate in start state coordinatesend - End stateendPivotX - Pivot point's X coordinate in end state coordinatesendPivotY - Pivot point's Y coordinate in end state coordinatesfactor - Factor