Re: [css3-transitions] Rounding behaviour

Dean? David? Any thoughts here?

Thanks,

Brian

(2012/02/03 12:10), Brian Birtles wrote:
> [Reposting, this time referring to the correct spec :)]
>
> Dear all,
>
> The SVG WG would like to align SVG animation features with CSS
> Transitions and CSS Animations where possible.
>
> One area where this is difficult is with regards to interpolating
> integer values.
>
> SVG (referencing SMIL) defines such interpolation as happening in
> floating point space and then being rounded:
>
> The semantics of clamping values for attributes should be performed in
> floating point with a precision of at least that given by a 4-byte
> IEEE-format real number [IEEE-Arithmetic]. ... For integer attributes
> the computed value should then be rounded to the nearest integer
> (coerced-integer-value). The mathematical definition of rounding is:
>
> coerced-integer-value = Math.floor( interpolated-value + 0.5 )[1]
>
> CSS on the other hand uses floor:
>
> The interpolation happens in real number space and is converted to an
> integer using floor().[2]
>
> Is there a particular reason to prefer the floor behaviour over rounding?
>
> If not, I would like to request that CSS Transitions use round for
> consistency with SVG 1.1 and SMIL 3.
>
> Thank you!
>
> Best regards,
>
> Brian Birtles
>
> [1]
> http://www.w3.org/TR/SMIL/smil-profile.html#SMILProfileNS-animation-module
>
> [2] http://dev.w3.org/csswg/css3-transitions/#animation-of-property-types-
>

Received on Friday, 24 February 2012 02:10:45 UTC