• Explorer09's avatar
    Change variable 'dot' to avoid division by reciprocal. · 040613db
    Explorer09 authored
    (Cherry-picked from d56bcd8e, the
    experimental graph coloring branch)
    
    The variable 'dot' in GraphMeterMode_draw now means "maximum number of
    dots per value (column) in graph". The old meaning was "amount of value
    that is to be represented by a dot" and was always a fraction. Due to
    a limitation in floating point computing, if GRAPH_HEIGHT were not a
    power of 2, then rounding errors will occur on numbers like (1.0/3).
    (Currently GRAPH_HEIGHT is 4 and so no precision loss.) 'dot' was used
    as a divisor, and it's "division by a reciprocal". We change that to
    simple multiplication.
    040613db
Meter.c 14.3 KB