<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>18961</bug_id>
          
          <creation_ts>2012-09-21 20:44:48 +0000</creation_ts>
          <short_desc>The pseudo-code for matrix-decomposing has a typo in the check for a coordinate system flip</short_desc>
          <delta_ts>2012-10-18 18:35:42 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>CSS</product>
          <component>Transforms</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Nivesh Rajbhandari">nrajbhan</reporter>
          <assigned_to name="Simon Fraser">smfr</assigned_to>
          <cc>ayg</cc>
    
    <cc>cmarrin</cc>
    
    <cc>dino</cc>
    
    <cc>dschulze</cc>
    
    <cc>eoconnor</cc>
    
    <cc>smfr</cc>
          
          <qa_contact>public-css-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>74259</commentid>
    <comment_count>0</comment_count>
    <who name="Nivesh Rajbhandari">nrajbhan</who>
    <bug_when>2012-09-21 20:44:48 +0000</bug_when>
    <thetext>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) &lt; 0)
    for (i = 0; i &lt; 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) &lt; 0)
    for (i = 0; i &lt; 3; i++)
        scale[i] *= -1;
        row[i][0] *= -1
        row[i][1] *= -1
        row[i][2] *= -1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76600</commentid>
    <comment_count>1</comment_count>
    <who name="Dirk Schulze">dschulze</who>
    <bug_when>2012-10-18 18:35:42 +0000</bug_when>
    <thetext>Thank you for reporting. Fixed now.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>