Graphite
Version 3
An experimental 3D geometry processing program
|
Types and functions for numbers manipulation. More...
#include <geogram/basic/common.h>
#include <cmath>
#include <float.h>
#include <limits.h>
#include <algorithm>
#include <stdint.h>
#include <limits>
Go to the source code of this file.
Classes | |
struct | GEO::Numeric::LimitsHelper< T, is_numeric > |
Limits helper class that extends std::numeric_limits. More... | |
struct | GEO::Numeric::LimitsHelper< T, true > |
Specialization of LimitsHelper for numeric types. More... | |
struct | GEO::Numeric::Limits< T > |
Extends std::numeric_limits with additional information. More... | |
Namespaces | |
GEO | |
Global Vorpaline namespace. | |
GEO::Numeric | |
Defines numeric types used in Vorpaline. | |
Macros | |
#define | M_PI 3.14159265358979323846 |
Value of the constant PI if not defined by the system. | |
Typedefs | |
typedef void * | GEO::Numeric::pointer |
typedef int8_t | GEO::Numeric::int8 |
typedef int16_t | GEO::Numeric::int16 |
typedef int32_t | GEO::Numeric::int32 |
typedef int64_t | GEO::Numeric::int64 |
typedef uint8_t | GEO::Numeric::uint8 |
typedef uint16_t | GEO::Numeric::uint16 |
typedef uint32_t | GEO::Numeric::uint32 |
typedef uint64_t | GEO::Numeric::uint64 |
typedef float | GEO::Numeric::float32 |
typedef double | GEO::Numeric::float64 |
typedef geo_index_t | GEO::index_t |
The type for storing and manipulating indices. | |
typedef geo_signed_index_t | GEO::signed_index_t |
The type for storing and manipulating indices differences. More... | |
typedef geo_coord_index_t | GEO::coord_index_t |
The type for storing coordinate indices, and iterating on the coordinates of a point. | |
Enumerations | |
enum | GEO::Sign { GEO::NEGATIVE = -1 , GEO::ZERO = 0 , GEO::POSITIVE = 1 } |
Integer constants that represent the sign of a value. More... | |
Functions | |
template<class T > | |
Sign | GEO::geo_sgn (const T &x) |
Gets the sign of a value. More... | |
template<class T > | |
Sign | GEO::geo_cmp (const T &a, const T &b) |
Compares two values. More... | |
float32 | GEO::Numeric::max_float32 () |
Gets 32 bits float maximum positive value. | |
float32 | GEO::Numeric::min_float32 () |
Gets 32 bits float minimum negative value. | |
float64 | GEO::Numeric::max_float64 () |
Gets 64 bits float maximum positive value. | |
float64 | GEO::Numeric::min_float64 () |
Gets 64 bits float minimum negative value. | |
bool | GEO::Numeric::is_nan (float32 x) |
Checks whether a 32 bits float is "not a number". | |
bool | GEO::Numeric::is_nan (float64 x) |
Checks whether a 64 bits float is "not a number". | |
void | GEO::Numeric::random_reset () |
Resets the random number generator. | |
int32 | GEO::Numeric::random_int32 () |
Returns a 32 bits integer between 0 and RAND_MAX. | |
float32 | GEO::Numeric::random_float32 () |
Returns a 32 bits float between 0 and 1. | |
float64 | GEO::Numeric::random_float64 () |
Returns a 64 bits float between 0 and 1. | |
template<class T > | |
void | GEO::Numeric::optimize_number_representation (T &x) |
place holder for optimizing internal number representation More... | |
template<class T > | |
Sign | GEO::Numeric::ratio_compare (const T &a_num, const T &a_denom, const T &b_num, const T &b_denom) |
Compares two rational numbers given as separate numerators and denominators. More... | |
template<class T > | |
T | GEO::geo_sqr (T x) |
Gets the square value of a value. More... | |
template<class T > | |
void | GEO::geo_clamp (T &x, T min, T max) |
Clamps a value to a range. More... | |
index_t | GEO::max_index_t () |
Gets the maximum positive value of type index_t. | |
signed_index_t | GEO::max_signed_index_t () |
Gets the maximum positive value of type signed_index_t. | |
signed_index_t | GEO::min_signed_index_t () |
Gets the minimum negative value of type signed_index_t. | |
double | GEO::round (double x) |
Types and functions for numbers manipulation.
Definition in file numeric.h.