public final class MathUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static float |
abs(float v) |
static float |
acos(float value) |
static float |
asin(float value) |
static float |
atan(float value) |
static float |
atan2(float a,
float b) |
static float |
constrain(float amount,
float low,
float high) |
static int |
constrain(int amount,
int low,
int high) |
static long |
constrain(long amount,
long low,
long high) |
static float |
cross(float v1x,
float v1y,
float v2x,
float v2y) |
static float |
degrees(float radians) |
static float |
dist(float x1,
float y1,
float x2,
float y2) |
static float |
dist(float x1,
float y1,
float z1,
float x2,
float y2,
float z2) |
static float |
dot(float v1x,
float v1y,
float v2x,
float v2y) |
static float |
exp(float a) |
static float |
lerp(float start,
float stop,
float amount) |
static float |
log(float a) |
static float |
mag(float a,
float b) |
static float |
mag(float a,
float b,
float c) |
static float |
map(float minStart,
float minStop,
float maxStart,
float maxStop,
float value) |
static float |
max(float a,
float b) |
static float |
max(float a,
float b,
float c) |
static float |
max(int a,
int b) |
static float |
max(int a,
int b,
int c) |
static float |
min(float a,
float b) |
static float |
min(float a,
float b,
float c) |
static float |
min(int a,
int b) |
static float |
min(int a,
int b,
int c) |
static float |
norm(float start,
float stop,
float value) |
static float |
pow(float a,
float b) |
static float |
radians(float degrees) |
static float |
random(float howbig) |
static float |
random(float howsmall,
float howbig) |
static int |
random(int howbig) |
static int |
random(int howsmall,
int howbig) |
static void |
randomSeed(long seed) |
static float |
sq(float v) |
static float |
tan(float angle) |
public static float abs(float v)
public static int constrain(int amount, int low, int high)
public static long constrain(long amount, long low, long high)
public static float constrain(float amount, float low, float high)
public static float log(float a)
public static float exp(float a)
public static float pow(float a, float b)
public static float max(float a, float b)
public static float max(int a, int b)
public static float max(float a, float b, float c)
public static float max(int a, int b, int c)
public static float min(float a, float b)
public static float min(int a, int b)
public static float min(float a, float b, float c)
public static float min(int a, int b, int c)
public static float dist(float x1, float y1, float x2, float y2)
public static float dist(float x1, float y1, float z1, float x2, float y2, float z2)
public static float mag(float a, float b)
public static float mag(float a, float b, float c)
public static float sq(float v)
public static float dot(float v1x, float v1y, float v2x, float v2y)
public static float cross(float v1x, float v1y, float v2x, float v2y)
public static float radians(float degrees)
public static float degrees(float radians)
public static float acos(float value)
public static float asin(float value)
public static float atan(float value)
public static float atan2(float a, float b)
public static float tan(float angle)
public static float lerp(float start, float stop, float amount)
public static float norm(float start, float stop, float value)
public static float map(float minStart, float minStop, float maxStart, float maxStop, float value)
public static int random(int howbig)
public static int random(int howsmall, int howbig)
public static float random(float howbig)
public static float random(float howsmall, float howbig)
public static void randomSeed(long seed)