public class MathI
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String[] |
colorsList |
static java.lang.String |
InputParentDir |
static java.lang.String |
OutputParentDir |
static double |
PI |
static int |
X |
static int |
Y |
static int |
Z |
Constructor and Description |
---|
MathI() |
Modifier and Type | Method and Description |
---|---|
static double |
abs(double x)
shorthand for Math functions
|
static float |
abs(float x) |
static int |
abs(int x) |
static double |
acos(double x)
05/24/2013 this version checks for round-off error in x; i.e.
|
static float |
acos(float x)
05/24/2013 this version checks for round-off error in x; i.e.
|
static double |
acosh(double a) |
static float |
acosh(float a) |
static double |
acoth(double a) |
static double |
acsch(double a) |
static double |
asech(double a) |
static double |
asin(double x) |
static float |
asin(float x) |
static double |
asinh(double a) |
static float |
asinh(float a) |
static double |
atan(double x) |
static float |
atan(float x) |
static double |
atan2(double y,
double x) |
static float |
atan2(float y,
float x) |
static double |
atanh(double a) |
static int |
ceil(double x) |
static int |
ceil(float x) |
static double |
cos(double theta) |
static float |
cos(float theta) |
static double |
cosh(double a) |
static float |
cosh(float a) |
static double |
coth(double a) |
static double |
csch(double a) |
static double |
cube(double x) |
static float |
cube(float x) |
static int |
cube(int x) |
static double |
cubic_rt(double a1,
double a2,
double a3) |
static float |
cubic_rt(float a1,
float a2,
float a3)
function to calc the three solutions to the cubic equation:
x*x*x + a1*x*x + a2*x + a3 = 0
since two solutions may be imaginary, set up a dmatrix {3x2} (each
solution, real and imag parts) to hold the solution values
returns only the largest real root
|
static double |
cubrt(double x)
lame java math lib doesn't have cube root
|
static float |
cubrt(float x) |
static double |
doubleFactorial(int l) |
static double |
exp(double x) |
static float |
exp(float x) |
static int |
factoral(int i) |
static double |
fifthrt(double x) |
static float |
fifthrt(float x) |
static double |
fourthrt(double x) |
static float |
fourthrt(float x) |
static java.awt.Color |
getColor(java.lang.String color) |
static int |
Int(double x) |
static int |
Int(float x) |
static boolean |
isEven(int x) |
static boolean |
isOdd(int x) |
static double |
ln(double x) |
static float |
ln(float x) |
static double |
log(double x) |
static float |
log(float x) |
static double |
log10(double x)
lame java math lib doesn't even have log_base_10
|
static float |
log10(float x) |
static double |
max(double x,
double y) |
static float |
max(float x,
float y) |
static float |
max(float x,
float y,
float z) |
static float |
max(float w,
float x,
float y,
float z) |
static int |
max(int x,
int y) |
static int |
max(int x,
int y,
int z) |
static double |
min(double x,
double y) |
static float |
min(float x,
float y) |
static float |
min(float x,
float y,
float z) |
static float |
min(float w,
float x,
float y,
float z) |
static int |
min(int x,
int y) |
static int |
min(int x,
int y,
int z) |
static java.lang.String |
ms2MinSec(long time_ms) |
static double |
pow(double x,
double y) |
static double |
pow(double x,
int y) |
static float |
pow(float x,
float y) |
static float |
pow(float x,
int y) |
static int |
pow(int x,
int y) |
static int |
rem(int x,
int y) |
static int |
round(double x) |
static int |
round(float x)
the default (int) function simply truncates any decimal
points: (int)(1.9) = 1.
|
static double |
sech(double a)
Hyperbolic secant of a double number
|
static void |
setInputOutputDirs() |
static double |
sin(double theta) |
static float |
sin(float theta) |
static double |
sinh(double a)
Hyperbolic sine of a double number
|
static float |
sinh(float a) |
static double |
sqr(double x) |
static float |
sqr(float x) |
static int |
sqr(int x) |
static double |
sqrt(double x)
math does not have float version
|
static float |
sqrt(float x) |
static double |
tan(double theta) |
static float |
tan(float theta) |
static double |
tanh(double a) |
static float |
toFloat(byte A)
useful if you don't know what type of number you have
|
static float |
toFloat(short A) |
static java.lang.String |
toString(int val,
int ndigits)
goal to add right number of leading zeros
|
public static final int X
public static final int Y
public static final int Z
public static final double PI
public static java.lang.String InputParentDir
public static java.lang.String OutputParentDir
public static final java.lang.String[] colorsList
public static void setInputOutputDirs()
public static java.lang.String ms2MinSec(long time_ms)
public static java.lang.String toString(int val, int ndigits)
public static double abs(double x)
public static float abs(float x)
public static int abs(int x)
public static int rem(int x, int y)
public static boolean isOdd(int x)
public static boolean isEven(int x)
public static int ceil(float x)
public static int ceil(double x)
public static double sin(double theta)
public static float sin(float theta)
public static double cos(double theta)
public static float cos(float theta)
public static double tan(double theta)
public static float tan(float theta)
public static double asin(double x)
public static float asin(float x)
public static double acos(double x)
public static float acos(float x)
public static double atan(double x)
public static float atan(float x)
public static double atan2(double y, double x)
public static float atan2(float y, float x)
public static double sinh(double a)
public static double asinh(double a)
public static float sinh(float a)
public static float asinh(float a)
public static double cosh(double a)
public static double acosh(double a)
public static float cosh(float a)
public static float acosh(float a)
public static double tanh(double a)
public static double atanh(double a)
public static double coth(double a)
public static double acoth(double a)
public static double sech(double a)
public static double asech(double a)
public static double csch(double a)
public static double acsch(double a)
public static int max(int x, int y)
public static float max(float x, float y)
public static double max(double x, double y)
public static float max(float x, float y, float z)
public static float min(float x, float y, float z)
public static float max(float w, float x, float y, float z)
public static float min(float w, float x, float y, float z)
public static int max(int x, int y, int z)
public static int min(int x, int y, int z)
public static int min(int x, int y)
public static float min(float x, float y)
public static double min(double x, double y)
public static double exp(double x)
public static float exp(float x)
public static int pow(int x, int y)
public static float pow(float x, float y)
public static float pow(float x, int y)
public static double pow(double x, int y)
public static double pow(double x, double y)
public static double log(double x)
public static float log(float x)
public static double ln(double x)
public static float ln(float x)
public static int round(float x)
public static int round(double x)
public static int Int(float x)
public static int Int(double x)
public static float toFloat(byte A)
public static float toFloat(short A)
public static double sqr(double x)
public static float sqr(float x)
public static int sqr(int x)
public static double cube(double x)
public static float cube(float x)
public static int cube(int x)
public static double sqrt(double x)
public static float sqrt(float x)
public static double cubrt(double x)
public static float cubrt(float x)
public static double fourthrt(double x)
public static float fourthrt(float x)
public static double fifthrt(double x)
public static float fifthrt(float x)
public static double log10(double x)
public static float log10(float x)
public static float cubic_rt(float a1, float a2, float a3)
public static double cubic_rt(double a1, double a2, double a3)
public static java.awt.Color getColor(java.lang.String color)
public static int factoral(int i)
public static double doubleFactorial(int l)