public class MathUtil extends Object
Modifier and Type | Field and Description |
---|---|
static double |
DEFAULT_ERROR |
Constructor and Description |
---|
MathUtil() |
Modifier and Type | Method and Description |
---|---|
static boolean |
approxEqual(double x,
double y) |
static boolean |
approxEqual(double x,
double y,
double error)
Returns true if the difference between x and y is less than error.
|
static double |
diffSq(double x,
double y)
Calculate the squared difference of x and y.
|
static long |
factorial(int n)
Deprecated.
|
static double |
squared(double x)
Calculate the square of x.
|
static double |
sum(double[] series) |
public static final double DEFAULT_ERROR
public static double squared(double x)
public static double diffSq(double x, double y)
public static boolean approxEqual(double x, double y, double error)
public static boolean approxEqual(double x, double y)
public static double sum(double[] series)
public static long factorial(int n)
Copyright © 2014. All rights reserved.