util
Class GameMath
java.lang.Object
util.GameMath
public class GameMath
- extends java.lang.Object
- Author:
- Shannon Smith
|
Method Summary |
static float |
clamp(float val,
float min,
float max)
|
static int |
clamp(int val,
int min,
int max)
|
static float |
dist(float x1,
float y1,
float x2,
float y2)
|
static float |
dist(Vector3f v1,
Vector3f v2)
|
static float |
getMinAngle(float cur,
float target)
|
static float |
len(float x,
float y)
|
static float |
lineCircleIntersect(float x1,
float y1,
float x2,
float y2,
float r)
|
static float |
normaliseAngle(float a)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RADIANS_PER_DEGREE
public static final float RADIANS_PER_DEGREE
- See Also:
- Constant Field Values
DEGREES_PER_RADIAN
public static final float DEGREES_PER_RADIAN
- See Also:
- Constant Field Values
GameMath
public GameMath()
clamp
public static float clamp(float val,
float min,
float max)
clamp
public static int clamp(int val,
int min,
int max)
len
public static float len(float x,
float y)
dist
public static float dist(float x1,
float y1,
float x2,
float y2)
dist
public static float dist(Vector3f v1,
Vector3f v2)
getMinAngle
public static float getMinAngle(float cur,
float target)
normaliseAngle
public static float normaliseAngle(float a)
lineCircleIntersect
public static final float lineCircleIntersect(float x1,
float y1,
float x2,
float y2,
float r)