[css3-animations] Rounding behaviour

Dear all,

The SVG WG would like to align SVG Animation features with CSS 
Animations were 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 Animations use round for 
consistency with SVG 1.1 and SMIL 3, both of which are W3C Recommendations.

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 Thursday, 2 February 2012 03:50:26 UTC