Fix Exif.NikonFl7.FlashCompensation

main
postscript-dev 4 years ago
parent 277b1875f7
commit 562b10f2c7
No known key found for this signature in database
GPG Key ID: F3EC02A099292862

@ -2925,17 +2925,16 @@ fmountlens[] = {
std::ostringstream oss;
oss.copyfmt(os);
float temp = ( value.toFloat()/float(-6.0) );
temp *= float(1.00001); // Avoid round-off errors
if (temp == 0)
os << 0;
else if (!std::isfinite(temp))
os << "(" << value << ")";
else if (std::abs(std::fmod(temp, 1)) < 0.001)
else if (std::abs(std::remainderf(temp, 1)) < 0.001)
os << std::round(temp);
else if (std::abs(std::fmod(temp*2, 1)) < 0.001)
else if (std::abs(std::remainderf(temp*2, 1)) < 0.001)
os << std::round(temp*2) << "/2";
else if (std::abs(std::fmod(temp*3, 1)) < 0.001)
else if (std::abs(std::remainderf(temp*3, 1)) < 0.001)
os << std::round(temp*3) << "/3";
else
os << std::setprecision(3) << temp;

Loading…
Cancel
Save