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

Method Add

math.go:102–106  ·  view source on GitHub ↗

Add sets the components of p to the pointwise summation of p + p2

(p2 Point)

Source from the content-addressed store, hash-verified

100
101// Add sets the components of p to the pointwise summation of p + p2
102func (p *Point) Add(p2 Point) *Point {
103 p.X += p2.X
104 p.Y += p2.Y
105 return p
106}
107
108// Subtract sets the components of p to the pointwise difference of p - p2
109func (p *Point) Subtract(p2 Point) *Point {

Callers 3

TestPointPointAdditionFunction · 0.95
TestPointMethodChainFunction · 0.95
LineTraceFunction · 0.45

Calls

no outgoing calls

Tested by 2

TestPointPointAdditionFunction · 0.76
TestPointMethodChainFunction · 0.76