delta

fun delta(from: Point2D, to: Point2D): Point2D(source)

Signed shortest-direction delta from from to to under this projection's geometry. For a non-torus projection this is the trivial component-wise subtraction to - from. For a torus, each component picks whichever wrap (positive or negative) is shorter — so a boid at x = 99 querying a peer at x = 1 in a 100-wide torus gets dx = +2, not -98.

Use this for direction-aware forces (separation, cohesion) where averaging absolute positions would break across the wrap boundary.