aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel
diff options
context:
space:
mode:
Diffstat (limited to 'libcrystfel')
-rw-r--r--libcrystfel/src/integer_matrix.c21
-rw-r--r--libcrystfel/src/integer_matrix.h5
2 files changed, 7 insertions, 19 deletions
diff --git a/libcrystfel/src/integer_matrix.c b/libcrystfel/src/integer_matrix.c
index 7a373cbe..82ff461e 100644
--- a/libcrystfel/src/integer_matrix.c
+++ b/libcrystfel/src/integer_matrix.c
@@ -565,11 +565,13 @@ IntegerMatrix *intmat_identity(int size)
* Returns: an identity %IntegerMatrix with side length @size, or NULL on error.
*
*/
-void intmat_set_all_3x3(IntegerMatrix *m,
- signed int m11, signed int m12, signed int m13,
- signed int m21, signed int m22, signed int m23,
- signed int m31, signed int m32, signed int m33)
+IntegerMatrix *intmat_create_3x3(signed int m11, signed int m12, signed int m13,
+ signed int m21, signed int m22, signed int m23,
+ signed int m31, signed int m32, signed int m33)
{
+ IntegerMatrix *m = intmat_new(3, 3);
+ if ( m == NULL ) return NULL;
+
intmat_set(m, 0, 0, m11);
intmat_set(m, 0, 1, m12);
intmat_set(m, 0, 2, m13);
@@ -581,14 +583,5 @@ void intmat_set_all_3x3(IntegerMatrix *m,
intmat_set(m, 2, 0, m31);
intmat_set(m, 2, 1, m32);
intmat_set(m, 2, 2, m33);
-}
-
-
-IntegerMatrix *intmat_create_3x3(signed int m11, signed int m12, signed int m13,
- signed int m21, signed int m22, signed int m23,
- signed int m31, signed int m32, signed int m33)
-{
- IntegerMatrix *t = intmat_new(3, 3);
- intmat_set_all_3x3(t, m11, m12, m13, m21, m22, m23, m31, m32, m33);
- return t;
+ return m;
}
diff --git a/libcrystfel/src/integer_matrix.h b/libcrystfel/src/integer_matrix.h
index 6fb3e399..fca6445d 100644
--- a/libcrystfel/src/integer_matrix.h
+++ b/libcrystfel/src/integer_matrix.h
@@ -61,11 +61,6 @@ extern void intmat_set(IntegerMatrix *m, unsigned int i, unsigned int j,
extern signed int intmat_get(const IntegerMatrix *m,
unsigned int i, unsigned int j);
-extern void intmat_set_all_3x3(IntegerMatrix *m,
- signed int m11, signed int m12, signed int m13,
- signed int m21, signed int m22, signed int m23,
- signed int m31, signed int m32, signed int m33);
-
extern IntegerMatrix *intmat_create_3x3(signed int m11, signed int m12, signed int m13,
signed int m21, signed int m22, signed int m23,
signed int m31, signed int m32, signed int m33);