mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
off by one in mean calculation in Graph
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@923 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -77,7 +77,7 @@ GraphData::GraphData(const GraphDataPre& d)
|
||||
size_t left = counts.size();
|
||||
int i = 0;
|
||||
while (!counts.empty() && i < 100) {
|
||||
String is = String() << i++;
|
||||
String is = String() << i;
|
||||
map<String,UInt>::const_iterator it = counts.find(is);
|
||||
if (it == counts.end()) {
|
||||
// not found, add a 0 bar
|
||||
@@ -90,6 +90,7 @@ GraphData::GraphData(const GraphDataPre& d)
|
||||
counts.erase(is);
|
||||
left--;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
a->mean /= a->total;
|
||||
// drop empty tail
|
||||
|
||||
Reference in New Issue
Block a user