Developer Documentation
OpenMesh::Utils::NumLimitsT< Scalar > Class Template Reference

#include <Tools/Utils/NumLimitsT.hh>

Public Member Functions

bool is_float ()
 
bool is_float ()
 
bool is_float ()
 
bool is_signed ()
 
bool is_signed ()
 
bool is_signed ()
 
bool is_signed ()
 
bool is_signed ()
 
int min ()
 
int max ()
 
float min ()
 
float max ()
 
double min ()
 
double max ()
 

Static Public Member Functions

static Scalar min ()
 Return the smallest absolte value a scalar type can store. More...
 
static Scalar max ()
 Return the maximum absolte value a scalar type can store. More...
 
static bool is_float ()
 
static bool is_integer ()
 
static bool is_signed ()
 

Detailed Description

template<typename Scalar>
class OpenMesh::Utils::NumLimitsT< Scalar >

This class provides the maximum and minimum values a certain scalar type (int, float, or double) can store. You can use it like this:

#include <OpenMesh/Utils/NumLimitsT.hh>
int float_min = OpenMesh::NumLimitsT<float>::min();
float double_max = OpenMesh::NumLimitsT<double>::max();
Note
This functionality should be provided by std::numeric_limits. This template does not exist on gcc <= 2.95.3. The class template NumLimitsT is just a workaround.

Definition at line 91 of file NumLimitsT.hh.

Member Function Documentation

◆ is_float() [1/4]

template<typename Scalar >
static bool OpenMesh::Utils::NumLimitsT< Scalar >::is_float ( )
inlinestatic

Definition at line 99 of file NumLimitsT.hh.

◆ is_float() [2/4]

bool OpenMesh::Utils::NumLimitsT< float >::is_float ( )
inline

Definition at line 107 of file NumLimitsT.hh.

◆ is_float() [3/4]

bool OpenMesh::Utils::NumLimitsT< double >::is_float ( )
inline

Definition at line 110 of file NumLimitsT.hh.

◆ is_float() [4/4]

bool OpenMesh::Utils::NumLimitsT< longdouble >::is_float ( )
inline

Definition at line 113 of file NumLimitsT.hh.

◆ is_integer()

template<typename Scalar >
static bool OpenMesh::Utils::NumLimitsT< Scalar >::is_integer ( )
inlinestatic

Definition at line 100 of file NumLimitsT.hh.

◆ is_signed() [1/6]

template<typename Scalar >
static bool OpenMesh::Utils::NumLimitsT< Scalar >::is_signed ( )
inlinestatic

Definition at line 101 of file NumLimitsT.hh.

◆ is_signed() [2/6]

bool OpenMesh::Utils::NumLimitsT< unsignedchar >::is_signed ( )
inline

Definition at line 118 of file NumLimitsT.hh.

◆ is_signed() [3/6]

bool OpenMesh::Utils::NumLimitsT< unsignedshort >::is_signed ( )
inline

Definition at line 121 of file NumLimitsT.hh.

◆ is_signed() [4/6]

bool OpenMesh::Utils::NumLimitsT< unsignedint >::is_signed ( )
inline

Definition at line 124 of file NumLimitsT.hh.

◆ is_signed() [5/6]

bool OpenMesh::Utils::NumLimitsT< unsignedlong >::is_signed ( )
inline

Definition at line 127 of file NumLimitsT.hh.

◆ is_signed() [6/6]

bool OpenMesh::Utils::NumLimitsT< unsignedlonglong >::is_signed ( )
inline

Definition at line 130 of file NumLimitsT.hh.

◆ max() [1/4]

template<typename Scalar >
static Scalar OpenMesh::Utils::NumLimitsT< Scalar >::max ( )
inlinestatic

Return the maximum absolte value a scalar type can store.

Definition at line 97 of file NumLimitsT.hh.

◆ max() [2/4]

int OpenMesh::Utils::NumLimitsT< int >::max ( )
inline

Definition at line 134 of file NumLimitsT.hh.

◆ max() [3/4]

float OpenMesh::Utils::NumLimitsT< float >::max ( )
inline

Definition at line 137 of file NumLimitsT.hh.

◆ max() [4/4]

double OpenMesh::Utils::NumLimitsT< double >::max ( )
inline

Definition at line 140 of file NumLimitsT.hh.

◆ min() [1/4]

template<typename Scalar >
static Scalar OpenMesh::Utils::NumLimitsT< Scalar >::min ( )
inlinestatic

Return the smallest absolte value a scalar type can store.

Definition at line 95 of file NumLimitsT.hh.

◆ min() [2/4]

int OpenMesh::Utils::NumLimitsT< int >::min ( )
inline

Definition at line 133 of file NumLimitsT.hh.

◆ min() [3/4]

float OpenMesh::Utils::NumLimitsT< float >::min ( )
inline

Definition at line 136 of file NumLimitsT.hh.

◆ min() [4/4]

double OpenMesh::Utils::NumLimitsT< double >::min ( )
inline

Definition at line 139 of file NumLimitsT.hh.


The documentation for this class was generated from the following file: