Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Function CirclesIntersect(ByVal C1X As Double, C1Y As Double, ByVal C1R As Double, _
- ByVal C2X As Double, C2Y As Double, ByVal C2R As Double) As Boolean
- Dim Width As Double = Math.Abs(C1X - C2X)
- Dim Height As Double = Math.Abs(C1Y - C2Y)
- Dim Distance As Double = Math.Sqrt((Width ^ 2) + (Height ^ 2))
- If C1R + C2R >= Distance Then Return True Else Return False
- End Function
Advertisement
Add Comment
Please, Sign In to add comment