Extended code

This commit is contained in:
Pascal Serrarens 2025-02-11 14:25:57 +01:00
parent b56a010725
commit 0366989199

View File

@ -101,7 +101,6 @@ public class Matrix {
// double checked code
}
// Vector-matrix multiplication
public static float[] MultiplyMatrixVector(float[,] A, float[] v) {
int rows = A.GetLength(0);
int cols = A.GetLength(1);
@ -116,6 +115,7 @@ public class Matrix {
return result;
}
// Vector-matrix multiplication
public static Vector3 MultiplyMatrixVector3(float[,] A, Vector3 v) {
return new Vector3() {
x = A[0, 0] * v.x + A[0, 1] * v.y + A[0, 2] * v.z,