fredsa / forplay

Automatically exported from code.google.com/p/forplay
Apache License 2.0
12 stars 4 forks source link

Matrix math is incorrect for negative scale values #30

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Reported by matthew_mastracci.com:

import forplay.core.Transform;

public class ScaleTest {
       public static void main(String[] args) {
               Transform t = new Transform();
               t.scale(1, 1);
               System.out.println(t);
               t.setRotation(0);
               System.out.println(t);

               t = new Transform();
               t.scale(-1, 1);
               System.out.println(t);
               t.setRotation(0);
               System.out.println(t);
       }
}

[1.0 0.0
 0.0 1.0
 0.0 0.0]
[1.0 0.0
 -0.0 1.0
 0.0 0.0]

[-1.0 -0.0
 0.0 1.0
 -0.0 0.0]
[1.0 0.0
 -0.0 1.0
 -0.0 0.0]

Original issue reported on code.google.com by pdr@google.com on 1 Jun 2011 at 12:49

GoogleCodeExporter commented 9 years ago
Whoops, missed this one and entered a duplicate.

Original comment by jgw@google.com on 7 Jun 2011 at 1:30