File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -2925,17 +2925,16 @@ fmountlens[] = {
29252925 std::ostringstream oss;
29262926 oss.copyfmt (os);
29272927 float temp = ( value.toFloat ()/float (-6.0 ) );
2928- temp *= float (1.00001 ); // Avoid round-off errors
29292928
29302929 if (temp == 0 )
29312930 os << 0 ;
29322931 else if (!std::isfinite (temp))
29332932 os << " (" << value << " )" ;
2934- else if (std::abs (std::fmod (temp, 1 )) < 0.001 )
2933+ else if (std::abs (std::remainderf (temp, 1 )) < 0.001 )
29352934 os << std::round (temp);
2936- else if (std::abs (std::fmod (temp*2 , 1 )) < 0.001 )
2935+ else if (std::abs (std::remainderf (temp*2 , 1 )) < 0.001 )
29372936 os << std::round (temp*2 ) << " /2" ;
2938- else if (std::abs (std::fmod (temp*3 , 1 )) < 0.001 )
2937+ else if (std::abs (std::remainderf (temp*3 , 1 )) < 0.001 )
29392938 os << std::round (temp*3 ) << " /3" ;
29402939 else
29412940 os << std::setprecision (3 ) << temp;
You can’t perform that action at this time.
0 commit comments