math
Class MathUtils
java.lang.Object
math.MathUtils
public class MathUtils
- extends java.lang.Object
Field Summary |
static double |
LOG2
|
Method Summary |
static int |
atan(int y,
int x)
|
static double |
cos(double alpha)
|
static int |
gcd(int a,
int b)
|
static double |
getGauss(double x,
double xc,
double sigma)
|
static double[] |
getGauss(int n)
|
static double |
getLOG2()
|
static int |
getLogBase2(double d)
|
static double |
getTrapezoidal(double x,
double a,
double b,
double c,
double d)
|
static boolean |
isPowerOfTwo(double l)
|
static int |
isqrt(int x)
|
static short |
isqrt(short x)
|
static double |
log2(double l)
|
static int |
log2(int l)
|
static double |
max(int x,
int y)
|
static boolean |
nextTo(int x0,
int y0,
int x1,
int y1)
|
static boolean |
odd(int i)
|
static boolean |
onLine(int x0,
int y0,
int x1,
int y1,
int x2,
int y2)
|
static void |
print(double[] d)
|
static int |
roundToIntegralPowerOf2(int n)
|
static int |
sign(int x)
|
static double |
sin(double alpha)
|
static float |
sqrt(double f)
|
static float |
sqrt(float f)
|
static void |
testGauss()
|
static void |
testLongIsqrt()
|
static void |
writeOutRandomNumbersToAFile()
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOG2
public static double LOG2
MathUtils
public MathUtils()
writeOutRandomNumbersToAFile
public static void writeOutRandomNumbersToAFile()
odd
public static boolean odd(int i)
getLogBase2
public static int getLogBase2(double d)
- Parameters:
d
- input argument to the log2 function
- Returns:
- base 2 log.
getGauss
public static double getGauss(double x,
double xc,
double sigma)
getGauss
public static double[] getGauss(int n)
testGauss
public static void testGauss()
print
public static final void print(double[] d)
testLongIsqrt
public static void testLongIsqrt()
isqrt
public static short isqrt(short x)
isqrt
public static int isqrt(int x)
roundToIntegralPowerOf2
public static int roundToIntegralPowerOf2(int n)
getTrapezoidal
public static double getTrapezoidal(double x,
double a,
double b,
double c,
double d)
gcd
public static int gcd(int a,
int b)
log2
public static int log2(int l)
getLOG2
public static double getLOG2()
log2
public static double log2(double l)
isPowerOfTwo
public static boolean isPowerOfTwo(double l)
sign
public static int sign(int x)
cos
public static double cos(double alpha)
sin
public static double sin(double alpha)
atan
public static int atan(int y,
int x)
nextTo
public static boolean nextTo(int x0,
int y0,
int x1,
int y1)
onLine
public static boolean onLine(int x0,
int y0,
int x1,
int y1,
int x2,
int y2)
max
public static double max(int x,
int y)
sqrt
public static float sqrt(float f)
sqrt
public static float sqrt(double f)