Static Public Member Functions | |
static int | roundOff (double n) |
Round the given number to the nearest integer. | |
static double | roundOff (double n, double incr) |
Round the given number to the nearest increment. | |
static bool | feq (double n1, double n2, double accuracy=1.0E-05) |
Compare doubles to within a certain accuracy. | |
static int | compare (double a, float b, double accuracy=1.0E-05) |
Return a number less than, equal to, or greater than zero if a is less than, equal to, or greater than b. |
static int code::Arith::compare | ( | double | a, | |
float | b, | |||
double | accuracy = 1.0E-05 | |||
) | [inline, static] |
Return a number less than, equal to, or greater than zero if a is less than, equal to, or greater than b.
static bool code::Arith::feq | ( | double | n1, | |
double | n2, | |||
double | accuracy = 1.0E-05 | |||
) | [inline, static] |
Compare doubles to within a certain accuracy.
static double code::Arith::roundOff | ( | double | n, | |
double | incr | |||
) | [inline, static] |
Round the given number to the nearest increment.
For example, 3.14159 to the nearest 0.1 is 3.1.
static int code::Arith::roundOff | ( | double | n | ) | [inline, static] |
Round the given number to the nearest integer.