projects
/
ctsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Version 6.0.2 - new release
[ctsim.git]
/
libctsupport
/
xform.cpp
diff --git
a/libctsupport/xform.cpp
b/libctsupport/xform.cpp
index cf35c4c9872bf2b2a168e58e4b5a49d3c4895b1c..a8f09560d7aaa8871729db151eccbbf64b31e053 100644
(file)
--- a/
libctsupport/xform.cpp
+++ b/
libctsupport/xform.cpp
@@
-119,6
+119,13
@@
rot_mtx2 (GRFMTX_2D m, const double theta)
m[1][0] = -s; m[1][1] = c;
}
m[1][0] = -s; m[1][1] = c;
}
+void
+copy_mtx2 (GRFMTX_2D to, const GRFMTX_2D from) {
+ for (int r = 0; r < 3; r++)
+ for (int c = 0; c < 3; c++)
+ to[r][c] = from[r][c];
+}
+
void
mult_mtx2 (const GRFMTX_2D m1, const GRFMTX_2D m2, GRFMTX_2D result)
{
void
mult_mtx2 (const GRFMTX_2D m1, const GRFMTX_2D m2, GRFMTX_2D result)
{
@@
-131,10
+138,7
@@
mult_mtx2 (const GRFMTX_2D m1, const GRFMTX_2D m2, GRFMTX_2D result)
temp[row][col] += m1[row][calc] * m2[calc][col];
}
}
temp[row][col] += m1[row][calc] * m2[calc][col];
}
}
-
- for (int r = 0; r < 3; r++)
- for (int col = 0; col < 3; col++)
- result[r][col] = temp[r][col];
+ copy_mtx2 (result, temp);
}
void
}
void