refactoring

This commit is contained in:
Manuel Simon Hirsig
2016-08-02 14:29:13 +02:00
parent 54a2846f62
commit 2624fba4a2
8 changed files with 35 additions and 80 deletions
+1 -1
View File
@@ -72,7 +72,7 @@ function public.value(item_key)
local weighted_values = {}
local total_weight = 0
for _, data_point in item_record.data_points do
local weight = 0.99^Aux.round((item_record.data_points[1].time - data_point.time) / (60*60*24))
local weight = 0.99^Aux.util.round((item_record.data_points[1].time - data_point.time) / (60*60*24))
total_weight = total_weight + weight
tinsert(weighted_values, {value = data_point.market_value, weight = weight})
end