MCPcopy
hub / github.com/EngoEngine/engo / TestMatrixScale

Function TestMatrixScale

math_test.go:1071–1172  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1069}
1070
1071func TestMatrixScale(t *testing.T) {
1072 data := []struct {
1073 matrix, expected []float32
1074 scaleX, scaleY float32
1075 }{
1076 {
1077 scaleX: 1,
1078 scaleY: 1,
1079 matrix: []float32{
1080 1, 2, 3,
1081 2, 2, 2,
1082 1, 3, 2,
1083 },
1084 expected: []float32{
1085 1, 2, 3,
1086 2, 2, 2,
1087 1, 3, 2,
1088 },
1089 },
1090 {
1091 scaleX: 0,
1092 scaleY: 0,
1093 matrix: []float32{
1094 1, 2, 3,
1095 2, 2, 2,
1096 1, 3, 2,
1097 },
1098 expected: []float32{
1099 0, 0, 0,
1100 0, 0, 0,
1101 1, 3, 2,
1102 },
1103 },
1104 {
1105 scaleX: 0,
1106 scaleY: 1,
1107 matrix: []float32{
1108 1, 2, 3,
1109 2, 2, 2,
1110 1, 3, 2,
1111 },
1112 expected: []float32{
1113 0, 0, 0,
1114 2, 2, 2,
1115 1, 3, 2,
1116 },
1117 },
1118 {
1119 scaleX: 1,
1120 scaleY: 0,
1121 matrix: []float32{
1122 1, 2, 3,
1123 2, 2, 2,
1124 1, 3, 2,
1125 },
1126 expected: []float32{
1127 1, 2, 3,
1128 0, 0, 0,

Callers

nothing calls this directly

Calls 4

IdentityMatrixFunction · 0.85
FloatEqualFunction · 0.85
ScaleMethod · 0.80
SetMethod · 0.45

Tested by

no test coverage detected