Re: [css3-transitions] Where does SMIL/SVG Animation define interpolation of integers?

(2013/02/05 17:17), L. David Baron wrote:
> The CSS WG resolved today to change the integer interpolation rules
> css3-transitions to match SMIL / SVG Animation and use round rather
> than floor.
>
> However, I'd like to know where in SMIL or SVG Animation the
> rounding rules for integers are defined so I know exactly what sort
> of rounding to define.  (In particular, whether *.5 values round
> away from zero, towards zero, towards positive infinity, or towards
> negative infinity.)  I searched some relevant specs, but couldn't
> find the definition.

Hi David,

Although SVG only references SMIL Animation, there are a number of areas 
there are more precisely defined in SMIL 3.0 and there is a general 
understanding that these more precise definitions should be backported 
to SVG.

As a result the integer rounding behaviour is defined in SMIL 3.0, 
section 17.4.13 under 'Integration definitions'[1].

The definition there is:

   coerced-integer-value = Math.floor( interpolated-value + 0.5 )

Best regards,

Brian

[1] 
http://www.w3.org/TR/SMIL/smil-profile.html#SMILProfileNS-animation-module

Received on Tuesday, 5 February 2013 11:29:52 UTC