Extended code
This commit is contained in:
parent
b56a010725
commit
0366989199
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user