NAME

Box2D::b2Mat22 - A 2-by-2 matrix.

SYNOPSIS

my $matrix = Box2D::b2Mat22->new( $a11, $a12, $a21, $a22 );

DESCRIPTION

A 2-by-2 matrix. Stored in column-major order.

METHODS

new( $a11, $a12, $a21, $a22 )

Construct this matrix using scalars.

Parameters:

  • float32 $a11

  • float32 $a12

  • float32 $a21

  • float32 $a22

GetAngle()

Extract the angle from this matrix (assumed to be a rotation matrix).

Returns a float32

GetInverse()

Returns a Box2D::b2Mat22

Set( $c1, $c2 )

Initialize this matrix using columns.

Parameters:

  • Box2D::b2Vec2 $c1

  • Box2D::b2Vec2 $c2

SetIdentity()

Set this to the identity matrix.

SetZero()

Set this matrix to all zeros.

col1()

col1( $col1 )

Parameters:

  • Box2D::b2Vec2 $col1 (optional)

Returns a Box2D::b2Vec2

col2()

col2( $col2 )

Parameters:

  • Box2D::b2Vec2 $col2 (optional)

Returns a Box2D::b2Vec2

SEE ALSO

BUGS

See "BUGS" in Box2D

AUTHORS

See "AUTHORS" in Box2D

COPYRIGHT & LICENSE

See "COPYRIGHT & LICENSE" in Box2D