aboutsummaryrefslogtreecommitdiff
path: root/src/basis.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/basis.c')
-rw-r--r--src/basis.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/basis.c b/src/basis.c
index 08e3edb..f3b9b7a 100644
--- a/src/basis.c
+++ b/src/basis.c
@@ -68,3 +68,15 @@ double basis_efom(ReflectionList *reflectionlist, Basis *basis) {
}
+Basis basis_add(Basis u, Basis v) {
+
+ Basis ans;
+
+ ans.a.x = u.a.x + v.a.x; ans.a.y = u.a.y + v.a.y; ans.a.z = u.a.z + v.a.z;
+ ans.b.x = u.b.x + v.b.x; ans.b.y = u.b.y + v.b.y; ans.b.z = u.b.z + v.b.z;
+ ans.c.x = u.c.x + v.c.x; ans.c.y = u.c.y + v.c.y; ans.c.z = u.c.z + v.c.z;
+
+ return ans;
+
+}
+