org.python.core

Class ExtraMath

public class ExtraMath extends Object

A static utility class with two additional math functions.
Field Summary
static doubleCLOSE
static doubleEPSILON
static doubleLOG10
Method Summary
static booleanclose(double v, double w, double tol)
Are v and w "close" to each other?
static booleanclose(double v, double w)
static doublecloseFloor(double v)
Returns floor(v) except when v is very close to the next number, when it returns ceil(v);
static doublehypot(double v, double w)
static doublelog10(double v)

Field Detail

CLOSE

public static double CLOSE

EPSILON

public static double EPSILON

LOG10

public static double LOG10

Method Detail

close

public static boolean close(double v, double w, double tol)
Are v and w "close" to each other? Uses a scaled tolerance.

close

public static boolean close(double v, double w)

closeFloor

public static double closeFloor(double v)
Returns floor(v) except when v is very close to the next number, when it returns ceil(v);

hypot

public static double hypot(double v, double w)

log10

public static double log10(double v)