public static Matrix2x2 Rotation(float degree) { Matrix2x2 result = new Matrix2x2(); result.SetRotation(degree); result *= 0.5f; result += 0.5f; result = (result * 2.0f) - 1.0f; return(result); }
public static Matrix2x2 operator +(Matrix2x2 m, float scalar) { Matrix2x2 result = new Matrix2x2(m); for (int i = 0; i < 2; i++) { for (int j = 0; j < 2; j++) { result[i, j] += scalar; } } return(result); }
public Matrix2x2(Matrix2x2 other) { Set(other[0, 0], other[0, 1], other[1, 0], other[1, 1]); }