Add returns the component-wise sum of two points.
(q Point)
| 19 | |
| 20 | // Add returns the component-wise sum of two points. |
| 21 | func (p Point) Add(q Point) Point { |
| 22 | return Point{p.X + q.X, p.Y + q.Y} |
| 23 | } |
| 24 | |
| 25 | // Sub returns the component-wise difference of two points. |
| 26 | func (p Point) Sub(q Point) Point { |
no outgoing calls