From 1acd0a516a8544e3de49e3cbd88e3b1fcfc57a7f Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Fri, 9 Oct 2020 17:21:13 +0200 Subject: [PATCH] data undec: interpolate --- client/src/cmddata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/cmddata.c b/client/src/cmddata.c index a7575f590..f128a75d0 100644 --- a/client/src/cmddata.c +++ b/client/src/cmddata.c @@ -1037,7 +1037,7 @@ static int CmdUndec(const char *Cmd) { while (g_index < GraphTraceLen && s_index + factor < MAX_GRAPH_TRACE_LEN) { int count = 0; for (count = 0; count < factor && s_index + count < MAX_GRAPH_TRACE_LEN; count++) - swap[s_index + count] = GraphBuffer[g_index]; + swap[s_index + count] = ((double)(factor - count)/(factor - 1))*GraphBuffer[g_index] + ((double)count/factor)*GraphBuffer[g_index + 1]; s_index += count; g_index++; }