public class

MathUtils

extends Object
implements MathConstants
java.lang.Object
   ↳ org.anddev.andengine.util.MathUtils

Class Overview

(c) 2010 Nicolas Gramlich (c) 2011 Zynga Inc.

Summary

[Expand]
Inherited Constants
From interface org.anddev.andengine.util.constants.MathConstants
Fields
public static Random RANDOM
Public Constructors
MathUtils()
Public Methods
final static float arrayAverage(float[] pValues)
final static float arraySum(float[] pValues)
final static void arraySumInternal(int[] pValues)
final static void arraySumInternal(long[] pValues)
final static void arraySumInternal(long[] pValues, long pFactor)
final static void arraySumInto(long[] pValues, long[] pTargetValues, long pFactor)
static float atan2(float dY, float dX)
static int bringToBounds(int pMinValue, int pMaxValue, int pValue)
static float bringToBounds(float pMinValue, float pMaxValue, float pValue)
final static float degToRad(float pDegree)
static float distance(float pX1, float pY1, float pX2, float pY2)
final static boolean isPowerOfTwo(int n)
final static int nextPowerOfTwo(int n)
final static int nextPowerOfTwo(float f)
final static float radToDeg(float pRad)
final static float random(float pMin, float pMax)
final static int random(int pMin, int pMax)
final static int randomSign()
static float[] revertRotateAndScaleAroundCenter(float[] pVertices, float pRotation, float pRotationCenterX, float pRotationCenterY, float pScaleX, float pScaleY, float pScaleCenterX, float pScaleCenterY)
static float[] revertRotateAroundCenter(float[] pVertices, float pRotation, float pRotationCenterX, float pRotationCenterY)
static float[] revertScaleAroundCenter(float[] pVertices, float pScaleX, float pScaleY, float pScaleCenterX, float pScaleCenterY)
static float[] rotateAndScaleAroundCenter(float[] pVertices, float pRotation, float pRotationCenterX, float pRotationCenterY, float pScaleX, float pScaleY, float pScaleCenterX, float pScaleCenterY)
static float[] rotateAroundCenter(float[] pVertices, float pRotation, float pRotationCenterX, float pRotationCenterY)
static float[] scaleAroundCenter(float[] pVertices, float pScaleX, float pScaleY, float pScaleCenterX, float pScaleCenterY)
final static int sum(int[] pValues)
[Expand]
Inherited Methods
From class java.lang.Object

Fields

public static Random RANDOM

Public Constructors

public MathUtils ()

Public Methods

public static final float arrayAverage (float[] pValues)

public static final float arraySum (float[] pValues)

public static final void arraySumInternal (int[] pValues)

public static final void arraySumInternal (long[] pValues)

public static final void arraySumInternal (long[] pValues, long pFactor)

public static final void arraySumInto (long[] pValues, long[] pTargetValues, long pFactor)

public static float atan2 (float dY, float dX)

public static int bringToBounds (int pMinValue, int pMaxValue, int pValue)

public static float bringToBounds (float pMinValue, float pMaxValue, float pValue)

public static final float degToRad (float pDegree)

public static float distance (float pX1, float pY1, float pX2, float pY2)

public static final boolean isPowerOfTwo (int n)

public static final int nextPowerOfTwo (int n)

public static final int nextPowerOfTwo (float f)

public static final float radToDeg (float pRad)

public static final float random (float pMin, float pMax)

public static final int random (int pMin, int pMax)

Parameters
pMin inclusive!
pMax inclusive!

public static final int randomSign ()

public static float[] revertRotateAndScaleAroundCenter (float[] pVertices, float pRotation, float pRotationCenterX, float pRotationCenterY, float pScaleX, float pScaleY, float pScaleCenterX, float pScaleCenterY)

public static float[] revertRotateAroundCenter (float[] pVertices, float pRotation, float pRotationCenterX, float pRotationCenterY)

public static float[] revertScaleAroundCenter (float[] pVertices, float pScaleX, float pScaleY, float pScaleCenterX, float pScaleCenterY)

public static float[] rotateAndScaleAroundCenter (float[] pVertices, float pRotation, float pRotationCenterX, float pRotationCenterY, float pScaleX, float pScaleY, float pScaleCenterX, float pScaleCenterY)

public static float[] rotateAroundCenter (float[] pVertices, float pRotation, float pRotationCenterX, float pRotationCenterY)

public static float[] scaleAroundCenter (float[] pVertices, float pScaleX, float pScaleY, float pScaleCenterX, float pScaleCenterY)

public static final int sum (int[] pValues)