This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 18961 - The pseudo-code for matrix-decomposing has a typo in the check for a coordinate system flip
Summary: The pseudo-code for matrix-decomposing has a typo in the check for a coordina...
Status: RESOLVED FIXED
Alias: None
Product: CSS
Classification: Unclassified
Component: Transforms (show other bugs)
Version: unspecified
Hardware: All All
: P2 minor
Target Milestone: ---
Assignee: Simon Fraser
QA Contact: public-css-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-21 20:44 UTC by Nivesh Rajbhandari
Modified: 2012-10-18 18:35 UTC (History)
6 users (show)

See Also:


Attachments

Description Nivesh Rajbhandari 2012-09-21 20:44:48 UTC
Steps:
1. Go to http://dev.w3.org/csswg/css3-transforms/#matrix-decomposing
2. Look at the following check for a coordinate system flip:

Actual:
scale[0] *= -1

should be

scale[i] *= -1

// At this point, the matrix (in rows) is orthonormal.
// Check for a coordinate system flip.  If the determinant
// is -1, then negate the matrix and the scaling factors.
pdum3 = cross(row[1], row[2])
if (dot(row[0], pdum3) < 0)
    for (i = 0; i < 3; i++)
        scale[0] *= -1;
        row[i][0] *= -1
        row[i][1] *= -1
        row[i][2] *= -1


Expected:

// At this point, the matrix (in rows) is orthonormal.
// Check for a coordinate system flip.  If the determinant
// is -1, then negate the matrix and the scaling factors.
pdum3 = cross(row[1], row[2])
if (dot(row[0], pdum3) < 0)
    for (i = 0; i < 3; i++)
        scale[i] *= -1;
        row[i][0] *= -1
        row[i][1] *= -1
        row[i][2] *= -1
Comment 1 Dirk Schulze 2012-10-18 18:35:42 UTC
Thank you for reporting. Fixed now.