52 #ifndef OPENMESH_UTILS_NUMLIMITS_HH
53 #define OPENMESH_UTILS_NUMLIMITS_HH
88 template <
typename Scalar>
93 static inline Scalar
min() {
return 0; }
95 static inline Scalar
max() {
return 0; }
97 static inline bool is_float() {
return false; }
98 static inline bool is_integer() {
return !NumLimitsT<Scalar>::is_float(); }
99 static inline bool is_signed() {
return true; }
105 inline bool NumLimitsT<float>::is_float() {
return true; }
108 inline bool NumLimitsT<double>::is_float() {
return true; }
111 inline bool NumLimitsT<long double>::is_float() {
return true; }
116 inline bool NumLimitsT<unsigned char>::is_signed() {
return false; }
119 inline bool NumLimitsT<unsigned short>::is_signed() {
return false; }
122 inline bool NumLimitsT<unsigned int>::is_signed() {
return false; }
125 inline bool NumLimitsT<unsigned long>::is_signed() {
return false; }
128 inline bool NumLimitsT<unsigned long long>::is_signed() {
return false; }
145 #endif // OPENMESH_NUMLIMITS_HH defined
static Scalar max()
Return the maximum absolte value a scalar type can store.
Definition: NumLimitsT.hh:95
This class provides the maximum and minimum values a certain scalar type (int, float, or double) can store.
Definition: NumLimitsT.hh:89
static Scalar min()
Return the smallest absolte value a scalar type can store.
Definition: NumLimitsT.hh:93