public class Misc extends Object
| Modifier and Type | Field and Description |
|---|---|
static double |
maxReletiveError |
| 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 boolean |
compare(byte[] raw1,
byte[] raw2,
Formatter f) |
static void |
compare(float[] raw1,
float[] raw2,
Formatter f) |
static int |
compare(int x,
int y) |
static int |
compare(long x,
long y) |
static List |
getList(Iterable ii) |
static List<String> |
getProtocols(String url)
Return the set of leading protocols for a url; may be more than one.
|
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) |
static String |
showInts(int[] inta) |
public static final double maxReletiveError
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 showInts(int[] inta)
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 boolean compare(byte[] raw1,
byte[] raw2,
Formatter f)
public static void compare(float[] raw1,
float[] raw2,
Formatter f)
public static int compare(int x,
int y)
public static int compare(long x,
long y)
Copyright © 1999–2014 UCAR/Unidata. All rights reserved.