Go to the documentation of this file.
5 #ifndef CNOID_UTIL_FLOATING_NUMBER_STRING_H
6 #define CNOID_UTIL_FLOATING_NUMBER_STRING_H
9 #include <fmt/format.h>
12 #if !defined(INFINITY)
13 # define INFINITY (DBL_MAX+DBL_MAX)
16 # define NAN (INFINITY-INFINITY)
39 if(p !=
value.c_str()){
52 if(p !=
value.c_str()){
74 s = fmt::format(
"{:g}", rhs);
81 if(p !=
value.c_str() && nv > 0.0){
92 if(p !=
value.c_str() && nv >= 0.0){
100 operator std::string()
const {
const std::string & string() const
Definition: FloatingNumberString.h:104
FloatingNumberString(const std::string &value)
Definition: FloatingNumberString.h:35
FloatingNumberString()
Definition: FloatingNumberString.h:30
bool setNonNegativeValue(const std::string &value)
Definition: FloatingNumberString.h:89
double strtod(const char *nptr, char **endptr)
Definition: strtofloat.h:19
double value() const
Definition: FloatingNumberString.h:108
bool set(const std::string &value)
Definition: FloatingNumberString.h:49
Definition: FloatingNumberString.h:24
bool setPositiveValue(const std::string &value)
Definition: FloatingNumberString.h:78
Definition: AbstractSceneLoader.h:11
FloatingNumberString(double value)
Definition: FloatingNumberString.h:45
FloatingNumberString & operator=(double rhs)
Definition: FloatingNumberString.h:72
FloatingNumberString & operator=(const FloatingNumberString &rhs)
Definition: FloatingNumberString.h:61
FloatingNumberString & operator=(const std::string &rhs)
Definition: FloatingNumberString.h:67