File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change 2323#include < sys/types.h>
2424#endif
2525
26- #include < limits>
27-
2826namespace com ::saxbophone::sxpsxfp {
2927 class Fixed ; // forward-declaration to allow declaration of user-defined literals
3028
@@ -134,8 +132,7 @@ namespace com::saxbophone::sxpsxfp {
134132 * floating point support, so slow software floats will be used.
135133 */
136134 explicit constexpr operator double () const {
137- // return (double)this->_raw_value / Fixed::SCALE;
138- return std::numeric_limits<double >::quiet_NaN (); // NaN doesn't compare equal to itself
135+ return (double )this ->_raw_value / Fixed::SCALE;
139136 }
140137 /* *
141138 * @brief Explicit cast operator to float
@@ -150,8 +147,7 @@ namespace com::saxbophone::sxpsxfp {
150147 */
151148 explicit constexpr operator float () const {
152149 // reuse cast to double and then narrow it to float
153- // return (float)(double)*this;
154- return std::numeric_limits<float >::quiet_NaN (); // NaN doesn't compare equal to itself
150+ return (float )(double )*this ;
155151 }
156152 /* *
157153 * @returns Fixed-point value converted to integer, with fractional part truncated.
You can’t perform that action at this time.
0 commit comments