Fixed a couple of errors in methods comments

This commit is contained in:
Sergio Vera 2019-10-24 10:29:11 +02:00
parent aeef94f200
commit f24d465808
1 changed files with 2 additions and 2 deletions

View File

@ -622,7 +622,7 @@ func (r Rect) Intersect(s Rect) Rect {
return t return t
} }
// IntersectCircle returns a minimal required Vector, such that moving the circle by that vector would stop the Circle // IntersectCircle returns a minimal required Vector, such that moving the rect by that vector would stop the Circle
// and the Rect intersecting. This function returns a zero-vector if the Circle and Rect do not overlap, and if only // and the Rect intersecting. This function returns a zero-vector if the Circle and Rect do not overlap, and if only
// the perimeters touch. // the perimeters touch.
// //
@ -830,7 +830,7 @@ func (c Circle) Intersect(d Circle) Circle {
} }
} }
// IntersectLine will return the shortest Vec such that if the Rect is moved by the Vec returned, the Line and Rect no // IntersectLine will return the shortest Vec such that if the Circle is moved by the Vec returned, the Line and Rect no
// longer intersect. // longer intersect.
func (c Circle) IntersectLine(l Line) Vec { func (c Circle) IntersectLine(l Line) Vec {
return l.IntersectCircle(c).Scaled(-1) return l.IntersectCircle(c).Scaled(-1)