step

fun step(agent: A, dt: Double): Pair<Point2D, Point2D>(source)

One Euler integration step for agent: sum the registered forces, integrate velocity by (sumForce / mass) * dt, clamp to [minSpeed, maxSpeed], compute the candidate position pos + vNew * dt.

Returns the pair (newVelocity, candidatePosition). Does not apply the new state — the caller must call setVelocity and ContinuousProjection.moveTo explicitly (typically after validating or wrapping the candidate position).

Throws

if agent has no position in space

if dt is non-positive