changeset 119:fda016f64f7c sv1-v0.9rc2

* Fix rounding error in RealTime (thanks to Craig Sapp)
author Chris Cannam
date Tue, 16 May 2006 11:48:12 +0000
parents 4170b21773cf
children e388730429b5
files base/RealTime.cpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/base/RealTime.cpp	Mon May 15 13:04:37 2006 +0000
+++ b/base/RealTime.cpp	Tue May 16 11:48:12 2006 +0000
@@ -62,7 +62,7 @@
 RealTime
 RealTime::fromSeconds(double sec)
 {
-    return RealTime(int(sec), int((sec - int(sec)) * ONE_BILLION));
+    return RealTime(int(sec), int((sec - int(sec)) * ONE_BILLION + 0.5));
 }
 
 RealTime