We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f38447a commit d3befecCopy full SHA for d3befec
1 file changed
tests/MeshTypes/matrix_test.go
@@ -19,6 +19,25 @@ func TestIdentityMatrix(t *testing.T) {
19
}
20
21
22
+func TestMulScalar(t *testing.T) {
23
+ a := MeshTypes.Matrix{
24
+ X00: 1, X01: 2, X02: 3, X03: 4,
25
+ X10: 5, X11: 6, X12: 7, X13: 8,
26
+ X20: 9, X21: 10, X22: 11, X23: 12,
27
+ X30: 13, X31: 14, X32: 15, X33: 16,
28
+ }
29
+ want := MeshTypes.Matrix{
30
+ X00: 3, X01: 6, X02: 9, X03: 12,
31
+ X10: 15, X11: 18, X12: 21, X13: 24,
32
+ X20: 27, X21: 30, X22: 33, X23: 36,
33
+ X30: 39, X31: 42, X32: 45, X33: 48,
34
35
+ result := a.MulScalar(3)
36
+ if !reflect.DeepEqual(result, want) {
37
+ t.Errorf(`Matrix Scalar Multiplication Output does not match`)
38
39
+}
40
+
41
func TestMatrixMul(t *testing.T) {
42
a := MeshTypes.Matrix{
43
X00: 1, X01: 2, X02: 3, X03: 4,
0 commit comments