public class Misc extends Object
| Constructor and Description |
|---|
Misc() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
closeEnough(double v1,
double v2)
Check if numbers are equal with default tolerance
|
static boolean |
closeEnough(double v1,
double v2,
double tol)
Check if numbers are equal with tolerance
|
static boolean |
closeEnough(float v1,
float v2)
Check if numbers are equal with default tolerance
|
static void |
compare(byte[] raw1,
byte[] raw2,
Formatter f) |
static void |
compare(float[] raw1,
float[] raw2,
Formatter f) |
static List |
getList(Iterable ii) |
static int |
getSize(Iterable ii) |
static String |
getTestdataDirPath() |
static double |
howClose(double d1,
double d2) |
static void |
main(String[] args)
test
|
static String |
showBytes(byte[] buff) |
static void |
showBytes(byte[] buff,
Formatter f) |
public static double howClose(double d1,
double d2)
public static boolean closeEnough(double v1,
double v2,
double tol)
v1 - first floating point numberv2 - second floating point numbertol - reletive tolerencepublic static boolean closeEnough(double v1,
double v2)
v1 - first floating point numberv2 - second floating point numberpublic static boolean closeEnough(float v1,
float v2)
v1 - first floating point numberv2 - second floating point numberpublic static void main(String[] args)
public static String showBytes(byte[] buff)
public static void showBytes(byte[] buff,
Formatter f)
public static int getSize(Iterable ii)
public static String getTestdataDirPath()
public static void compare(byte[] raw1,
byte[] raw2,
Formatter f)
public static void compare(float[] raw1,
float[] raw2,
Formatter f)
Copyright © 1999-2012 UCAR/Unidata. All Rights Reserved.