Download Now

    Reference TMatrix2x2

    Declared in Codebot.Geometry.pas on line 287

    TMatrix2x2 is a two dimensional matrix without translation. Its fields are in rows, so a vector is transformed as (X*A + Y*B, X*C + Y*D).
      TMatrix2x2 = record
      public
        { Create a matrix from its fields }
        class function Create(A, B, C, D: Float): TMatrix2x2; static; inline;
        { Transform a vector }
        class operator Multiply(const M: TMatrix2x2; const V: TVec2): TVec2; inline;
        { Transform a vector }
        function Transform(const V: TVec2): TVec2; inline;
        A: Float;
        B: Float;
        C: Float;
        D: Float;
        V: array[0..3] of Float;
      end;

    See also

    Float in Codebot.System.pas