[webkit-reviews] review granted: [Bug 232013] Integer interpolation in animations should be rounded towards positive infinity, not away from zero : [Attachment 441884] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 20 10:46:01 PDT 2021


Darin Adler <darin at apple.com> has granted Joonghun Park
<jh718.park at samsung.com>'s request for review:
Bug 232013: Integer interpolation in animations should be rounded towards
positive infinity, not away from zero
https://bugs.webkit.org/show_bug.cgi?id=232013

Attachment 441884: Patch

https://bugs.webkit.org/attachment.cgi?id=441884&action=review




--- Comment #4 from Darin Adler <darin at apple.com> ---
Comment on attachment 441884
  --> https://bugs.webkit.org/attachment.cgi?id=441884
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=441884&action=review

> Source/WTF/wtf/MathExtras.h:147
> +inline double roundHalfTowardsPositiveInfinity(double value)
> +{
> +    return std::floor(value + 0.5);
> +}
> +
> +inline float roundHalfTowardsPositiveInfinity(float value)
> +{
> +    return std::floor(value + 0.5f);
> +}

I don’t think these function names need the word "half" in them. I also suggest
using the one-line format that the functions both above and below use.


More information about the webkit-reviews mailing list