Open tovare opened 6 years ago
Since many languages use this as a reserved word. Maybe it would be even clearer to use something like p1, p2 or A,B ?
func (p1 Point) distance(p2 Point) float64 { return math.Sqrt(p1.xp2.x + p1.yp2.y) }
What's the reserved word? You mean the word this? Isn't that a JavaScript thing?
this
Right, not really directly related to the comparison ... its javascript, java :-)
Since many languages use this as a reserved word. Maybe it would be even clearer to use something like p1, p2 or A,B ?
func (p1 Point) distance(p2 Point) float64 { return math.Sqrt(p1.xp2.x + p1.yp2.y) }