CVBpy 14.0
Matrix2D Class Reference

Double precision 2x2 matrix class. More...

Inherits object.

Public Member Functions

cvb.Matrix2D create ()
 Construct a 2x2 matrix. More...
 
cvb.Matrix2D identity ()
 The identity element. More...
 
None invert (self)
 Inverts this matrix if possible. More...
 

Properties

 a11 = property
 float: Gets or sets top left matrix element.
 
 a12 = property
 float: Gets or sets top right matrix element.
 
 a21 = property
 float: Gets or sets bottom left matrix element.
 
 a22 = property
 float: Gets or sets bottom right matrix element.
 
 det = property
 float: Matrix determinant.
 

Detailed Description

Double precision 2x2 matrix class.

Supports the same arguments as cvb.Matrix2D.create.

Parameters

*args : Any Parameters like cvb.Matrix2D.create.

**kwargs : Any Parameters like cvb.Matrix2D.create.

Member Function Documentation

◆ create()

cvb.Matrix2D create ( )

Construct a 2x2 matrix.

Returns

cvb.Matrix2D A 2D matrix

Parameters

a11 : float Top left matrix element.

a12 : float Top right matrix element.

a21 : float Bottom left matrix element.

a22 : float Bottom right matrix element.

Returns

cvb.Matrix2D A 2D matrix

Construct a 2x2 matrix.

Parameters

rotation : cvb.Angle Rotation angle to create the matrix for.

scale : float Scale factor to create the matrix for

Returns

cvb.Matrix2D A 2D matrix

Construct a 2x2 matrix.

Parameters

scale : float Scale factor to create the matrix for

Returns

cvb.Matrix2D A 2D matrix

Construct a 2x2 matrix.

Parameters

scale_x : float Scale factor in X direction to create the matrix.

scale_y : float Scale factor in Y direction to create the matrix.

Returns

cvb.Matrix2D A 2D matrix

Construct a 2x2 matrix.

Parameters

column1 : cvb.Point2D Column vector one.

column2 : cvb.Point2D Columns vector two.

Returns

cvb.Matrix2D A 2D matrix

Construct a 2x2 matrix.

Parameters

values : List[float] A list containing exactly 4 elements,

Returns

cvb.Matrix2D A 2D matrix.

◆ identity()

cvb.Matrix2D identity ( )

The identity element.

Returns

cvb.Matrix2D An identity matrix.

◆ invert()

None invert (   self)

Inverts this matrix if possible.

Might cause division by zero.