Commit Graph

2 Commits

Author SHA1 Message Date
50ccd73592 visualizers: use double instead of float
To give us less changes of incorrect values when converting between scales
(at the cost of 2x the array size).
2018-06-16 20:22:53 -07:00
571c2320da pointcache: add PointCache utility class
This is a simple cache that keeps x,y pairs for use when drawing
visualizers. To keep this generic, and save on memory, we simply
store the x,y coordinates as floats between 0.0 and 1.0. This
saves us roughly 50% on each data point over the 2 8-byte
numbers we would otherwise store.

Obviously, we could take this further and make some fancy index
storage with run-length-encode values, but this should work for
now and allow us to get more exotic later.
2016-09-26 17:34:58 -07:00