MCPcopy Create free account
hub / github.com/EngoEngine/engo / TestPointPointSubtraction

Function TestPointPointSubtraction

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

Source from the content-addressed store, hash-verified

53}
54
55func TestPointPointSubtraction(t *testing.T) {
56 a := Point{10, 15}
57 b := Point{5, 2}
58 a.Subtract(b)
59 if a.X != 5 {
60 t.Errorf("a.X should equal 5 not %v", a.X)
61 }
62
63 if a.Y != 13 {
64 t.Errorf("a.Y should equal 13 not %v", a.Y)
65 }
66}
67
68func TestPointPointMultiplication(t *testing.T) {
69 a := Point{10, 2}

Callers

nothing calls this directly

Calls 1

SubtractMethod · 0.95

Tested by

no test coverage detected