summaryrefslogtreecommitdiffstats
path: root/src/math/test/matrix_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/math/test/matrix_test.cpp')
-rw-r--r--src/math/test/matrix_test.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/math/test/matrix_test.cpp b/src/math/test/matrix_test.cpp
index 21e02db..95f1ed7 100644
--- a/src/math/test/matrix_test.cpp
+++ b/src/math/test/matrix_test.cpp
@@ -331,18 +331,18 @@ int TestMultiplyVector()
const Math::Matrix mat1(
(float[4][4])
{
- { 0.0536517635602049, 0.1350203249258820, -1.4709867280474975, 1.4199163191255975 },
- { 0.4308040094214364, 0.6860887768493787, 0.0555235810428098, 0.0245232625281863 },
- { -0.9570012049134703, 1.4008557175488343, 1.0277555933198543, 1.2311131809078903 },
- { 1.5609168701538376, -0.4917648784647429, 1.3748498152379420, 0.2479075063284996 }
+ { 0.188562846910008, -0.015148651460679, 0.394512304108827, 0.906910631257135 },
+ { -0.297506779519667, 0.940119328178913, 0.970957796752517, 0.310559318965526 },
+ { -0.819770525290873, -2.316574438778879, 0.155756069319732, -0.855661405742964 },
+ { 0.000000000000000, 0.000000000000000, 0.000000000000000, 1.000000000000000 }
}
);
- const Math::Vector vec1(0.587443623396385, 0.653347527302101, -0.434049355720428);
+ const Math::Vector vec1(-0.824708565156661, -1.598287748103842, -0.422498044734181);
- const Math::Vector expectedMultiply1(8.82505163446795, 2.84325886975415, 4.61111014687784);
+ const Math::Vector expectedMultiply1(0.608932463260470, -1.356893266403749, 3.457156276255142);
- Math::Vector multiply1 = Math::MatrixVectorMultiply(mat1, vec1);
+ Math::Vector multiply1 = Math::MatrixVectorMultiply(mat1, vec1, false);
if (! Math::VectorsEqual(multiply1, expectedMultiply1, TEST_TOLERANCE ) )
{
fprintf(stderr, "Multiply vector 1 mismath!\n");
@@ -352,18 +352,18 @@ int TestMultiplyVector()
const Math::Matrix mat2(
(float[4][4])
{
- { 1.2078126667092564, 0.5230257362392928, -0.7623036312496848, -1.4192273892400153 },
- { 0.7165407622837081, 1.3746282484390115, -0.8382279333943382, 0.8248340530209490 },
- { -0.9595506321366957, -0.0169226311095793, -0.7271125620609374, -1.5540250647342428 },
- { 1.2788946935793131, 0.1516426145850322, 1.2115324484930112, -0.1584402989052367 }
+ { -0.63287117038834284, 0.55148060401816856, -0.02042395559467368, -1.50367083897656850 },
+ { 0.69629042156335297, 0.12982747869796774, -1.16250029235919405, 1.19084447253756909 },
+ { 0.44164132914357224, -0.15169304045662041, -0.00880583574621390, -0.55817802940035310 },
+ { 0.95680476533530789, -1.51912346889253125, -0.74209769406615944, -0.20938988867903682 }
}
);
- const Math::Vector vec2(-0.7159607709627414, -0.3163937238507886, 0.0290730716146861);
+ const Math::Vector vec2(0.330987381051962, 1.494375516393466, 1.483422335561857);
- const Math::Vector expectedMultiply2(2.274144199387390, 0.135691892790685, 0.812276027335184);
+ const Math::Vector expectedMultiply2(0.2816820577317669, 0.0334468811767428, 0.1996974284970455);
- Math::Vector multiply2 = Math::MatrixVectorMultiply(mat2, vec2);
+ Math::Vector multiply2 = Math::MatrixVectorMultiply(mat2, vec2, true);
if (! Math::VectorsEqual(multiply2, expectedMultiply2, TEST_TOLERANCE ) )
{
fprintf(stderr, "Multiply vector 2 mismath!\n");