aboutsummaryrefslogtreecommitdiffstats
path: root/test/raytracer/matrix.c
diff options
context:
space:
mode:
authorxleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2010-03-03 12:34:43 +0000
committerxleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2010-03-03 12:34:43 +0000
commit6c196ec8a41d6ed506c133c8b33dba9684f9a7a6 (patch)
tree4e1422ea2a810520d0d9b0fbb78c0014ba9f8443 /test/raytracer/matrix.c
parent93d89c2b5e8497365be152fb53cb6cd4c5764d34 (diff)
downloadcompcert-kvx-6c196ec8a41d6ed506c133c8b33dba9684f9a7a6.tar.gz
compcert-kvx-6c196ec8a41d6ed506c133c8b33dba9684f9a7a6.zip
Updated raytracer test. Added SPASS test.
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1271 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'test/raytracer/matrix.c')
-rw-r--r--test/raytracer/matrix.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/raytracer/matrix.c b/test/raytracer/matrix.c
index 88143468..5c85c7b4 100644
--- a/test/raytracer/matrix.c
+++ b/test/raytracer/matrix.c
@@ -3,12 +3,6 @@
#include "vector.h"
#include "matrix.h"
-struct matrix matrix_identity = {
- 1.0, 0.0, 0.0, 0.0,
- 0.0, 1.0, 0.0, 0.0,
- 0.0, 0.0, 1.0, 0.0,
-};
-
void apply_to_point(struct matrix * m, struct point * p,
/*out*/ struct point * r)
{
@@ -25,7 +19,13 @@ void apply_to_vect(struct matrix * m, struct vector * v,
r->dz = m->zx * v->dx + m->zy * v->dy + m->zz * v->dz;
}
+static struct matrix matrix_identity = {
+ 1.0, 0.0, 0.0, 0.0,
+ 0.0, 1.0, 0.0, 0.0,
+ 0.0, 0.0, 1.0, 0.0,
+};
+struct matrix * mid = &matrix_identity;
struct matrix * mtranslate(flt sx, flt sy, flt sz)
{