pick Nearest Or First
fun <T> List<SteeringAction<T, Euclidean2DPosition>>.pickNearestOrFirst(env: Environment<T, Euclidean2DPosition>, pedestrian: Pedestrian2D<T>): SteeringAction<T, Euclidean2DPosition>?
Content copied to clipboard
Picks the SteeringActionWithTarget whose target is nearest to the pedestrian's current position, or the first action of the list if none of them has a defined target. If the list is empty, null is returned.