Changeset 5400
- Timestamp:
- May 3, 2015 5:34:14 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
nanovis/branches/1.2/nanovis.cpp
r5394 r5400 19 19 #include <cassert> 20 20 #include <cstdio> 21 #include <cmath> // for fmod() 21 22 22 23 #include <GL/glew.h> … … 701 702 struct timeval clock; 702 703 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 - 706 705 volInterp->getStartTime(); 707 706 708 TRACE("% lf %lf", elapsed_time,707 TRACE("%g %g", elapsed_time, 709 708 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()); 714 711 if (f == 0.0) { 715 fraction = 0.0 f;712 fraction = 0.0; 716 713 } else { 717 714 fraction = f / volInterp->getInterval(); 718 715 } 719 TRACE("fraction : % f", fraction);720 volInterp->update( fraction);716 TRACE("fraction : %g", fraction); 717 volInterp->update((float)fraction); 721 718 } 722 719 }
Note: See TracChangeset
for help on using the changeset viewer.