graphs
Definition
-- @/lua/common/utils.lua:282
-- ASCII graph
function graphs(v, len)
local size = min(len, floor(abs(v)))
return '['..string.rep(v>0 and "+" or "-", size) .. string.rep(' ', len - size)..']'
end
Callers
@/lua/ge/extensions/scenario/busdriver.lua
local smoothness = max(abs(smAcc) + smJer)
--log("I", "", graphs(20*smAcc, 20)..graphs(20*smJer, 20)..graphs(20*smoothness, 20)..dumps(smoothness).." \t "..dumps(smAcc).." \t "..dumps(smJer))
stats[stop].smoothness.mark = smoothness
local smoothness = max(abs(smAcc) + smJer)
--log("I", "", graphs(20*smAcc, 20)..graphs(20*smJer, 20)..graphs(20*smoothness, 20)..dumps(smoothness).." \t "..dumps(smAcc).." \t "..dumps(smJer))
stats[stop].smoothness.mark = smoothness
local smoothness = max(abs(smAcc) + smJer)
--log("I", "", graphs(20*smAcc, 20)..graphs(20*smJer, 20)..graphs(20*smoothness, 20)..dumps(smoothness).." \t "..dumps(smAcc).." \t "..dumps(smJer))
stats[stop].smoothness.mark = smoothness