MCPcopy Index your code
hub / github.com/EngoEngine/engo / TestMatrixTranslatePoint

Function TestMatrixTranslatePoint

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

Source from the content-addressed store, hash-verified

970}
971
972func TestMatrixTranslatePoint(t *testing.T) {
973 data := []struct {
974 matrix, expected []float32
975 point Point
976 }{
977 {
978 point: Point{
979 X: 0,
980 Y: 0,
981 },
982 matrix: []float32{
983 0, 1, 2,
984 1, 2, 3,
985 2, 3, 4,
986 },
987 expected: []float32{
988 0, 1, 2,
989 1, 2, 3,
990 2, 3, 4,
991 },
992 },
993 {
994 point: Point{
995 X: 15,
996 Y: 15,
997 },
998 matrix: []float32{
999 0, 1, 2,
1000 1, 2, 3,
1001 2, 3, 4,
1002 },
1003 expected: []float32{
1004 0, 1, 2,
1005 1, 2, 3,
1006 17, 48, 79,
1007 },
1008 },
1009 {
1010 point: Point{
1011 X: -5,
1012 Y: -5,
1013 },
1014 matrix: []float32{
1015 0, 1, 2,
1016 1, 2, 3,
1017 2, 3, 4,
1018 },
1019 expected: []float32{
1020 0, 1, 2,
1021 1, 2, 3,
1022 -3, -12, -21,
1023 },
1024 },
1025 {
1026 point: Point{
1027 X: 5,
1028 Y: -5,
1029 },

Callers

nothing calls this directly

Calls 4

IdentityMatrixFunction · 0.85
FloatEqualFunction · 0.85
TranslatePointMethod · 0.80
SetMethod · 0.45

Tested by

no test coverage detected