public final class MathUtils
extends java.lang.Object
| Constructor and Description |
|---|
MathUtils() |
| Modifier and Type | Method and Description |
|---|---|
protected static float |
getRectRatio(android.graphics.RectF rect)
Computes the aspect ratio of a given rect.
|
protected static boolean |
haveSameAspectRatio(android.graphics.RectF r1,
android.graphics.RectF r2)
Checks whether two
RectF have the same aspect ratio. |
protected static float |
truncate(float f,
int decimalPlaces)
Truncates a float number
f to decimalPlaces. |
protected static float truncate(float f,
int decimalPlaces)
f to decimalPlaces.f - the number to be truncated.decimalPlaces - the amount of decimals that f
will be truncated to.f.protected static boolean haveSameAspectRatio(android.graphics.RectF r1,
android.graphics.RectF r2)
RectF have the same aspect ratio.r1 - the first rect.r2 - the second rect.true if both rectangles have the same aspect ratio,
false otherwise.protected static float getRectRatio(android.graphics.RectF rect)
rect - the rect to have its aspect ratio computed.