Add sets the components of p to the pointwise summation of p + p2
(p2 Point)
| 100 | |
| 101 | // Add sets the components of p to the pointwise summation of p + p2 |
| 102 | func (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 |
| 109 | func (p *Point) Subtract(p2 Point) *Point { |
no outgoing calls