mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-13 14:07:01 -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();
|
size_t left = counts.size();
|
||||||
int i = 0;
|
int i = 0;
|
||||||
while (!counts.empty() && i < 100) {
|
while (!counts.empty() && i < 100) {
|
||||||
String is = String() << i++;
|
String is = String() << i;
|
||||||
map<String,UInt>::const_iterator it = counts.find(is);
|
map<String,UInt>::const_iterator it = counts.find(is);
|
||||||
if (it == counts.end()) {
|
if (it == counts.end()) {
|
||||||
// not found, add a 0 bar
|
// not found, add a 0 bar
|
||||||
@@ -90,6 +90,7 @@ GraphData::GraphData(const GraphDataPre& d)
|
|||||||
counts.erase(is);
|
counts.erase(is);
|
||||||
left--;
|
left--;
|
||||||
}
|
}
|
||||||
|
i++;
|
||||||
}
|
}
|
||||||
a->mean /= a->total;
|
a->mean /= a->total;
|
||||||
// drop empty tail
|
// drop empty tail
|
||||||
|
|||||||
Reference in New Issue
Block a user