30 int to_return = int(to_round);
32 if (to_round -
float(to_return) > 0.5) to_return++;
39 int to_return = int(to_round);
41 if (to_round -
double(to_return) > 0.5) to_return++;
59 {
return (n < 2)? 1 : n *
factorial(n - 1); }
A grab-bag of mathematical functions that are frequently useful.
static int round_it(double to_round)
returns the rounded integer value for "to_round".
static basis::un_int factorial(int n)
returns n! (factorial), which is n * (n - 1) * (n - 2) ...
static int round_it(float to_round)
returns the rounded integer value for "to_round".
Constants and objects used throughout HOOPLE.
unsigned int un_int
Abbreviated name for unsigned integers.
An extension to floating point primitives providing approximate equality.