public Vec2 Transform(Mat3x2 matrix) { return(new Vec2 ( (x * matrix.x.x) + (y * matrix.y.x) + (z * matrix.z.x), (x * matrix.x.y) + (y * matrix.y.y) + (z * matrix.z.y) )); }
public static void Multiply(ref Mat2x3 matrix1, ref Mat3x2 matrix2, out Mat2 result) { result.x.x = (matrix1.x.x * matrix2.x.x) + (matrix1.x.y * matrix2.y.x) + (matrix1.x.z * matrix2.z.x); result.x.y = (matrix1.x.x * matrix2.x.y) + (matrix1.x.y * matrix2.y.y) + (matrix1.x.z * matrix2.z.y); result.y.x = (matrix1.y.x * matrix2.x.x) + (matrix1.y.y * matrix2.y.x) + (matrix1.y.z * matrix2.z.x); result.y.y = (matrix1.y.x * matrix2.x.y) + (matrix1.y.y * matrix2.y.y) + (matrix1.y.z * matrix2.z.y); }
public Vec3 Transform(Mat3x2 matrix) { return(new Vec3 ( (matrix.x.x * x) + (matrix.x.y * y), (matrix.y.x * x) + (matrix.y.y * y), (matrix.z.x * x) + (matrix.z.y * y) )); }
public static void Transpose(Mat2x3 matrix, out Mat3x2 result) { result.x.x = matrix.x.x; result.x.y = matrix.y.x; result.y.x = matrix.x.y; result.y.y = matrix.y.y; result.z.x = matrix.x.z; result.z.y = matrix.y.z; }
public Mat2x3 Transpose(Mat3x2 matrix) { Mat2x3 result; result.x.x = matrix.x.x; result.x.y = matrix.y.x; result.x.z = matrix.z.x; result.y.x = matrix.x.y; result.y.y = matrix.y.y; result.y.z = matrix.z.y; return(result); }