public Matrixf22 Add(Matrixf22 other) { return(new Matrixf22( a + other.a, b + other.b, c + other.c, d + other.d)); }
public Matrixf22 Subtract(Matrixf22 other) { return(new Matrixf22( a - other.a, b - other.b, c - other.c, d - other.d)); }
public Matrixf22 Mul(Matrixf22 other) { var newA = a * other.a + b * other.c; var newB = a * other.b + b * other.d; var newC = c * other.a + d * other.c; var newD = c * other.b + d * other.d; return(new Matrixf22(newA, newB, newC, newD)); }
public static Vector2 Mul(this Vector2 v, Matrixf22 m) { return(new Vector2( v.x * m.a + v.y * m.c, v.x * m.b + v.y * m.d)); }
public bool Equals(Matrixf22 other) { var areEqual = (a == other.a) && (b == other.b) && (c == other.c) && (d == other.d); return(areEqual); }
public Matrixf22 Div(Matrixf22 other) { return(Mul(other.Inv())); }