summaryrefslogtreecommitdiff
path: root/stats.py
diff options
context:
space:
mode:
authorFlorian Jung <flo@windfisch.org>2015-08-25 22:52:33 +0200
committerFlorian Jung <flo@windfisch.org>2015-08-25 22:52:33 +0200
commit9dcba9467aface38c1bb4f0d1a9a478c3e884f20 (patch)
treea7bff6e6bb0607b2002091f6d792577327d05f8c /stats.py
parente1c27fad9b0cb29d13bceeebf98824a47d26371c (diff)
store cellspeed with precision of 0.1
Diffstat (limited to 'stats.py')
-rw-r--r--stats.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/stats.py b/stats.py
index fec5825..be8b547 100644
--- a/stats.py
+++ b/stats.py
@@ -102,7 +102,7 @@ class Stats:
for i in range(1,n+1):
cellspeed += (cell.poslog[-i] - cell.poslog[-i-1]).len() / n
- cellspeed = int(cellspeed)
+ cellspeed = int(cellspeed*10)/10
self.data.size_vs_speed[cell.size][cellspeed] += 1
visible_width = max( map(lambda cell : cell.pos.x - cell.size, cells) ) - min( map(lambda cell : cell.pos.x + cell.size, cells) )