openfl / box2d

Haxe port of Box2D, a popular rigid-body 2D physics engine
Other
95 stars 28 forks source link

Default value of B2Mat22 is probably wrong #11

Closed boblucas closed 9 years ago

boblucas commented 9 years ago
class B2Mat22
{
    public function new ()
    {
        col1 = new B2Vec2(0, 1.0);
        col2 = new B2Vec2(0, 1.0);
    }
}

This would initialize the matrix in a way that when used as a transform results in a width of 0, which is hardly ever useful. I'd except it to be initialized as such:

class B2Mat22
{
    public function new ()
    {
        col1 = new B2Vec2(1.0, 0);
        col2 = new B2Vec2(0, 1.0);
    }
}
jgranick commented 9 years ago

Thanks, good catch! :shipit: