Changeset 5400 for nanovis


Ignore:
Timestamp:
May 3, 2015, 8:34:14 PM (4 years ago)
Author:
ldelgass
Message:

minor change to sync with nanovis trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nanovis/branches/1.2/nanovis.cpp

    r5394 r5400  
    1919#include <cassert>
    2020#include <cstdio>
     21#include <cmath> // for fmod()
    2122
    2223#include <GL/glew.h>
     
    701702        struct timeval clock;
    702703        gettimeofday(&clock, NULL);
    703         double elapsed_time;
    704 
    705         elapsed_time = clock.tv_sec + clock.tv_usec/1000000.0 -
     704        double elapsed_time = clock.tv_sec + clock.tv_usec/1000000.0 -
    706705            volInterp->getStartTime();
    707706
    708         TRACE("%lf %lf", elapsed_time,
     707        TRACE("%g %g", elapsed_time,
    709708              volInterp->getInterval());
    710         float fraction;
    711         float f;
    712 
    713         f = fmod((float) elapsed_time, (float)volInterp->getInterval());
     709        double fraction;
     710        double f = fmod(elapsed_time, volInterp->getInterval());
    714711        if (f == 0.0) {
    715             fraction = 0.0f;
     712            fraction = 0.0;
    716713        } else {
    717714            fraction = f / volInterp->getInterval();
    718715        }
    719         TRACE("fraction : %f", fraction);
    720         volInterp->update(fraction);
     716        TRACE("fraction : %g", fraction);
     717        volInterp->update((float)fraction);
    721718    }
    722719}
Note: See TracChangeset for help on using the changeset viewer.