contains

infix operator fun Circle.contains(point: FlatPoint): Boolean

Circle contains FlatPoint => Boolean
Returns whether the point lies in the circle's interior or on the circle.

True when point dot this — positive inside a classic circle, negative outside — rounds to non-negative at the SCALE quantum, so the boundary counts as contained. Orientation-aware: an inside-out circle negates the probe, so its interior is the unbounded region outside it, boundary included. Against an imaginary classic circle the raw probe is negative everywhere. The probe is quadratic — the same precision caveat as FlatPoint on Circle. An operator fun: point in circle spells containment, point !in circle the strict outside — neither inside nor on the circle.

Receiver

The circle tested against.

Return

true when the rounded probe is non-negative.

Parameters

point

The point to test.


infix operator fun Circle.contains(point: RoundPoint): Boolean

Circle contains RoundPoint => Boolean
Returns whether the point lies in the circle's interior or on the circle.

True when point dot this rounds to non-negative at the SCALE quantum — the same orientation-aware quadratic gate as Circle contains FlatPoint, whose residual grows with the radius. The pairing reads the point's stored round bulk RoundPoint.aw, so the containment reading holds for null-lifted points; a semantic aw (a center, an attitude) feeds that data into the probe instead. An operator fun: point in circle spells containment, point !in circle the strict outside.

Receiver

The circle tested against.

Return

true when the rounded probe is non-negative.

Parameters

point

The point to test.


infix operator fun Circle.contains(other: Circle): Boolean

Circle contains Circle => Boolean
Returns whether the other circle's region lies within the region this circle bounds, boundaries included — internal tangency and identical circles count.

Orientation-aware on both sides: a classic circle bounds its disk, an inside-out circle the unbounded region outside itself. For real circles with radii r₁ (this) and r₂ (other) and centers d apart:

ThisOtherContains when
classicclassicd + r₂ ≤ r₁ — nested, the other no bigger than this one
inside-outinside-outd + r₁ ≤ r₂ — nested, the other no smaller than this one
inside-outclassicd ≥ r₁ + r₂ — the other's disk clears this one's excluded region
classicinside-outnever — an unbounded region cannot fit in a bounded one

The decision rounds at the SCALE quantum: one metric gate — this dot other plus the product of the radii must round to non-positive — and, for same-orientation operands, a rounded radius comparison picking the valid nesting. Imaginary operands are not rejected: the same gates run on the raw magnitudes of their radii, with no region behind the answer. An operator fun: inner in outer spells the containment, inner !in outer its failure — the other circle's region reaching outside this one's.

Receiver

The circle whose region must contain the other.

Return

true when the rounded gates pass.

Parameters

other

The circle whose region must fit.


infix operator fun Polygon.contains(point: FlatPoint): Boolean

Polygon contains FlatPoint => Boolean
Returns whether the point lies within the polygon's solid region, boundary included.

Containment by the nonzero winding rule: the point sits within the loop when the polygon's directed edges wind around it a net nonzero number of times, so self-touching and self-crossing loops classify by winding — a pentagram's center is within. Orientation-aware: a classic polygon contains the points its loop winds around; an inside-out polygon (Polygon.isInsideOut) contains the complement — the points its loop does not wind around — so point !in -polygon is the strict interior of polygon. The boundary is probed first with FlatPoint on Polygon, rounded at the SCALE quantum, owns the whole tolerance, and counts as contained in both orientations; off the boundary the crossing walk runs raw. An operator fun: point in polygon spells containment, point !in polygon the strict outside — neither within the solid region nor on the boundary.

Receiver

The polygon tested against.

Return

true when the point is on the boundary, or the winding number matches the polygon's orientation — nonzero for classic, zero for inside-out.

Parameters

point

The point to test.


infix operator fun Polygon.contains(point: RoundPoint): Boolean

Polygon contains RoundPoint => Boolean
Returns whether the point lies within the polygon's solid region, boundary included.

Polygon contains FlatPoint on the point's flat projection RoundPoint.toFlat; neither the boundary probes nor the winding walk read the round bulk, so the flat and round forms agree exactly — orientation-awareness included. An operator fun: point in polygon spells containment, point !in polygon the strict outside.

Receiver

The polygon tested against.

Return

true when the point is on the boundary, or the winding number matches the polygon's orientation — nonzero for classic, zero for inside-out.

Parameters

point

The point to test.