Project

General

Profile

Bug #809 » exiv2-nikonmn.diff

patch - Pavel Heimlich, 25 Jan 2012 14:40

View differences:

src/nikonmn.cpp Sun Jan 22 22:33:55 2012 +0000 → src/nikonmn.cpp Wed Jan 25 22:36:24 2012 +0000
50 50
#include <iomanip>
51 51
#include <cassert>
52 52
#include <cstring>
53
#include <cmath>
53
#include <math.h> //for log, pow, abs
54 54

  
55 55
// *****************************************************************************
56 56
// class member definitions
......
2454 2454
        std::ostringstream oss;
2455 2455
        oss.copyfmt(os);
2456 2456
        char sign = value.toLong() < 0 ? '-' : '+';
2457
        long h = long(abs(value.toLong())/60.0);
2458
        long min = abs(value.toLong()) - h*60;
2457
        long h = long(abs(value.toFloat())/60.0);
2458
        long min = abs(value.toFloat()) - h*60;
2459 2459
        os << std::fixed << "UTC " << sign << std::setw(2) << std::setfill('0') << h << ":" 
2460 2460
           << std::setw(2) << std::setfill('0') << min;
2461 2461
        os.copyfmt(oss);
(1-1/2)