public class MathUtil extends Object
Constructor and Description |
---|
MathUtil() |
Modifier and Type | Method and Description |
---|---|
static double |
euclideanDistance(double[] point1,
double[] point2)
Calculate the euclidean distance between two input points of equal dimension
|
static double |
roundOff(double value,
int decimalPlaces)
Round-off a value to a given number of decimal points
|
static double |
sum(double[] val)
Calculate sum of double array
|
public static double sum(double[] val)
val
- double arraypublic static double roundOff(double value, int decimalPlaces)
value
- double valuedecimalPlaces
- number of decimal pointspublic static double euclideanDistance(double[] point1, double[] point2)
point1
- input point onepoint2
- input point twoCopyright © 2018 WSO2. All rights reserved.