Skip to content
  • Dmitry Kazakov's avatar
    Fix shaky lines on 32-bit systems · c8709b33
    Dmitry Kazakov authored
    The value of the mirrored x coordinate is almost exactly integer
    all the time. On 64-bit systems the CPU converts it into integer
    correctly, but on 32-bit systems it probably doesn't download it
    from the FPU register (which are 80-bit and therefore more precise),
    so the value got truncated to the decremented value. It results in the
    lines becoming shaky due to random precision errors.
    
    Now we explicitly round "almost-integer" part of the sum so no precision
    fluctuations happen.
    
    BUG:341577
    c8709b33