some improvments
This commit is contained in:
@@ -21,10 +21,10 @@ func (p Point) Add(dx, dy float64) Point {
|
||||
}
|
||||
|
||||
// Add vector to a point.
|
||||
func (this Point) AddVector(v Vector) Point {
|
||||
this.X += v.Dx
|
||||
this.Y += v.Dy
|
||||
return this
|
||||
func (p Point) AddVector(v Vector) Point {
|
||||
p.X += v.Dx
|
||||
p.Y += v.Dy
|
||||
return p
|
||||
}
|
||||
|
||||
func (p Point) String() string {
|
||||
|
||||
Reference in New Issue
Block a user