[Zope-CVS] CVS: Products/ZCTextIndex - Index.py:1.1.2.14

Tim Peters tim.one@comcast.net
Fri, 3 May 2002 01:18:15 -0400


Update of /cvs-repository/Products/ZCTextIndex
In directory cvs.zope.org:/tmp/cvs-serv18243

Modified Files:
      Tag: TextIndexDS9-branch
	Index.py 
Log Message:
scaled_int():  we're saving few enough fractional bits (just 8) that it's
better to round than to truncate.


=== Products/ZCTextIndex/Index.py 1.1.2.13 => 1.1.2.14 ===
 
 def scaled_int(f):
-    return int(f * 256)
+    return int(round(f * 256))
 
 class Index:
     __implements__ = IIndex