public class EatGameUtil
extends java.lang.Object
限定符和类型 | 字段和说明 |
---|---|
static int |
DEFAULT_SOUND_POOL_MAX_STREAMS |
static java.util.Map<java.lang.String,java.lang.ref.WeakReference<android.graphics.Bitmap>> |
sCache |
static float |
SCALE_RATIO |
static int[] |
sScoreRes |
static float |
THRESHOLD_EAT |
构造器和说明 |
---|
EatGameUtil() |
限定符和类型 | 方法和说明 |
---|---|
static double |
calTwoPointsDistance(android.graphics.PointF p1,
android.graphics.PointF p2) |
static float |
getAverage(float[] inputData)
求给定数组中值的平均值
|
static android.graphics.Bitmap |
getBmpByAvatarUrl(java.lang.String url) |
static android.graphics.Bitmap |
getBmpByScore(java.lang.String score) |
static int |
getCount(float[] inputData)
求给定数组中值的数目
|
static float |
getSquareSum(float[] inputData)
求给定数组中值的平方和
|
static double |
getStandardDeviation(float[] inputData)
求给定数组中值的标准差
|
static float |
getSum(float[] inputData)
求给定数组中值的和
|
static float |
getVariance(float[] inputData)
求给定数组中值的方差
|
static void |
mapSurfaceRect(int inputWidth,
int inputHeight,
int outputWidth,
int outputHeight,
android.graphics.RectF rect) |
static void |
release() |
public static final int[] sScoreRes
public static final float SCALE_RATIO
public static final float THRESHOLD_EAT
public static final int DEFAULT_SOUND_POOL_MAX_STREAMS
public static java.util.Map<java.lang.String,java.lang.ref.WeakReference<android.graphics.Bitmap>> sCache
public static void release()
public static android.graphics.Bitmap getBmpByAvatarUrl(java.lang.String url)
public static android.graphics.Bitmap getBmpByScore(java.lang.String score)
public static double calTwoPointsDistance(android.graphics.PointF p1, android.graphics.PointF p2)
public static float getVariance(float[] inputData)
inputData
- 输入数据数组public static double getStandardDeviation(float[] inputData)
inputData
- 输入数据数组public static int getCount(float[] inputData)
inputData
- 输入数据数组public static float getAverage(float[] inputData)
inputData
- 输入数据数组public static float getSquareSum(float[] inputData)
inputData
- 输入数据数组public static float getSum(float[] inputData)
inputData
- 输入数据数组public static void mapSurfaceRect(int inputWidth, int inputHeight, int outputWidth, int outputHeight, android.graphics.RectF rect)