GeometrySingleton.segmentIntersectsCircle

Given the 2d segment (segment_from, segment_to), returns the position on the segment (as a number between 0 and 1) at which the segment hits the circle that is located at position circle_position and has radius circle_radius. If the segment does not intersect the circle, -1 is returned (this is also the case if the line extending the segment would intersect the circle, but the segment does not).

struct GeometrySingleton
@nogc nothrow
double
segmentIntersectsCircle
(
in Vector2 segment_from
,
in Vector2 segment_to
,
in Vector2 circle_position
,
in double circle_radius
)

Meta