Click or drag to resize

UtilIntersectCircleCircle Method

Calculate the intersection points of two circles.

Namespace: Demo3D.Common
Assembly: Demo3D.Common (in Demo3D.Common.dll) Version: 19.01.00
Syntax
C#
public static Vector2[] IntersectCircleCircle(
	Vector2 center1,
	double radius1,
	Vector2 center2,
	double radius2
)

Parameters

center1  Vector2
Center of the first circle.
radius1  Double
Radius of the first circle.
center2  Vector2
Center of the second circle.
radius2  Double
Radius of the second circle.

Return Value

Vector2
null meaning no intersections (includes case where one circle is contained in the other, or circles are co-incident), or a Vector2[], containing the two intersections, or just a single intersection if the circles are just touching.
See Also