bool Intersections::CircleVsPointIntersection(const Vector2<float>& aCirclePosition, const float& aCircleRadius, const Vector2<float>& aPointPosition) { Vector2<float> differenceVector = aCirclePosition-aPointPosition; return differenceVector.Length2() <= aCircleRadius*aCircleRadius; }
bool Intersections::CircleVsCircleIntersection(const Vector2<float>& aFirstCirclePosition, const float& aFirstCircleRadius, const Vector2<float>& aSecondCirclePosition, const float& aSecondCircleRadius) { Vector2<float> differenceVector = aFirstCirclePosition-aSecondCirclePosition; float totalRadius = aFirstCircleRadius+aSecondCircleRadius; return differenceVector.Length2() <= totalRadius*totalRadius; }