Skip to content

Commit 562b10f

Browse files
Fix Exif.NikonFl7.FlashCompensation
1 parent 277b187 commit 562b10f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/nikonmn_int.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff 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;

0 commit comments

Comments
 (0)