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

Constructors

Properties

col1: b2Vec2

Column 1

col2: b2Vec2

Column 2

Methods

  • Gets the rotation matrix angle. R(theta) = [ cos(theta) -sin(theta) ] [ sin(theta) cos(theta) ]

    Returns number

    The rotation matrix angle (theta).

  • Sets the 2x2 rotation matrix from the given angle. R(theta) = [ cos(theta) -sin(theta) ] [ sin(theta) cos(theta) ]

    Parameters

    • angle: number

      Matrix angle (theta).

    Returns void

  • Creates a rotation 2x2 matrix from the given angle. R(theta) = [ cos(theta) -sin(theta) ] [ sin(theta) cos(theta) ]

    Parameters

    • angle: number

      Matrix angle (theta).

    Returns b2Mat22

    2x2 matrix.