W3C home > Mailing lists > Public > public-css-archive@w3.org > March 2019

[csswg-drafts] [css-transforms] Interpolation of 2D matrices (#3709)

From: kevers-google via GitHub <sysbot+gh@w3.org>
Date: Wed, 06 Mar 2019 15:25:10 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-417860890-1551885904-sysbot+gh@w3.org>
kevers-google has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-transforms]  Interpolation of 2D matrices ==
Interpolation of 2D matrices
(https://drafts.csswg.org/css-transforms/#interpolation-of-decomposed-2d-matrix-values)

The pseudo code for matrix interpolation contains the following:

// Don’t rotate the long way around.
if (!angleA)
    angleA = 360
if (!angleB)
    angleB = 360

if (abs(angleA - angleB) > 180)
    ...

Having conditions whose truth value depends on precise floating point tends to introduce sensitivity to small errors in numerical precision.  In this case, however, it looks like the !angle checks are superfluous.  Having an angle of 0 versus +/-1e-6 does not affect the interpolation path unless right at the 180 degree  boundary. Rotating from 360 to 181 degrees, is equivalent to rotating from 0 to -179 degrees.  These conditional angle tweaks from 0 to 360 should probably be removed from the spec.




Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3709 using your GitHub account
Received on Wednesday, 6 March 2019 15:25:11 UTC

This archive was generated by hypermail 2.4.0 : Thursday, 24 March 2022 20:26:57 UTC