W3C home > Mailing lists > Public > public-css-archive@w3.org > October 2018

Re: [csswg-drafts] [css-transforms-2] Permit piecewise rotation interpolation when 0deg angle is present #3236

From: alancutter via GitHub <sysbot+gh@w3.org>
Date: Fri, 26 Oct 2018 06:06:07 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-433296870-1540533966-sysbot+gh@w3.org>
I didn't actually write this algorithm, I just moved it around.
The `dot < 0` is a cheap way to test whether the axies are more than 90 degrees apart from each other.
The next bit is seeing how close the dot product of the normalised vectors is to 1 (0 degrees apart). It's squaring the dot product so that any vector length component in it becomes squared also so that we can divide by squared lengths since they can be computed without needing to call sqrt().

GitHub Notification of comment by alancutter
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/pull/3250#issuecomment-433296870 using your GitHub account
Received on Friday, 26 October 2018 06:06:08 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:38 UTC