- Fixed a typo when calculating a weighted average
Yaron Kfir [06-03-14 - 18:45]
- Fixed a typo when calculating a weighted average
diff --git a/Changelog b/Changelog
index dc588a3..019a907 100644
--- a/Changelog
+++ b/Changelog
@@ -1,5 +1,8 @@
Changelog
+v0.8
+ - Fixed a typo when calculating a weighted average
+
v0.7
- Added an experimental way to clean stale prices in the database. Use it at your own risk, as it has not been debugged yet.
- Suggested price shows which guild it was found in, if possible.
diff --git a/MathUtils.lua b/MathUtils.lua
index b99681d..149b592 100644
--- a/MathUtils.lua
+++ b/MathUtils.lua
@@ -18,7 +18,7 @@ function MathUtils:WeightedAverage(itemTable)
weight = weight + itemTable[i].stackCount
end
item = {
- price = math.floor(sun / weight)
+ price = math.floor(sum / weight)
}
return item
end