Package-level declarations

The measure tier: scalar Euclidean measurements answered raw — distances as non-negative Doubles, angles as signed Angles.

PairingResult
FlatPoint distanceTo FlatPoint
RoundPoint distanceTo RoundPoint
FlatPoint distanceTo RoundPoint
RoundPoint distanceTo FlatPoint
the raw distance between the positions
FlatPoint distanceTo Line
RoundPoint distanceTo Line
the raw perpendicular distance to the line
Line angleTo Linethe raw signed angle turning the first direction onto the second

The family contract:

  • Distances are absolute. A distance is non-negative; the signed sidedness of a point against a line keeps its one spelling in the dot family (point dot line).

  • Angles are signed and orientation-sensitive. Counter-clockwise positive in (−π, π]; reversing either line's orientation offsets the answer by a half turn.

  • Positions only. A sized or imaginary round point measures from its position — the conformal component takes no part. Circles and dipoles have no pairing here: a scalar against a genuinely round object is a conformal measurement, not a Euclidean one, and lives in the dot family.

  • Raw everywhere. No SCALE rounding anywhere in the family — measures are values, not decisions.

  • Finite operands. An operand at infinity has no Euclidean reading and the answer degenerates; gate with the isAtInfinity predicates.

Functions

Link copied to clipboard
infix fun Line.angleTo(other: Line): Angle

Line angleTo Line => Angle
Returns the signed angle turning this line's direction onto other's — counter-clockwise positive, in (−π, π].

Link copied to clipboard

FlatPoint distanceTo FlatPoint => Double
Returns the raw Euclidean distance between the two points.

infix fun FlatPoint.distanceTo(line: Line): Double

FlatPoint distanceTo Line => Double
Returns the raw perpendicular distance from the point to the line.

FlatPoint distanceTo RoundPoint => Double
Returns the raw Euclidean distance between the flat point and the round point's position.

infix fun RoundPoint.distanceTo(flatPoint: FlatPoint): Double

RoundPoint distanceTo FlatPoint => Double
Returns the raw Euclidean distance between the round point's position and the flat point.

infix fun RoundPoint.distanceTo(line: Line): Double

RoundPoint distanceTo Line => Double
Returns the raw perpendicular distance from the point's position to the line.

RoundPoint distanceTo RoundPoint => Double
Returns the raw Euclidean distance between the two points' positions.