Skip to content
  • Ell's avatar
    Bug 788461 - Selection with a Fixed size is created with an ... · 80a52686
    Ell authored
    ... off-by one size in special cases
    
    The last commit wasn't drastic enough.  We changed SIGNED_ROUND()
    to use RINT(), which, in turn, may use rint().  However, rint()
    effectively breaks ties to even, so that we get stuff like
    'rint (1.5) - rint (0.5) == 2.0 - 0.0 == 2.0'.  This can't be
    good--it's entirely possible that we're bitten by this in other
    cases without noticing.
    
    Avoid rint() entirely in RINT(), and always use 'floor (x) + 0.5'
    instead, which always breaks ties up.  Hopefully, this doesn't
    break anything else...
    80a52686