Arguments

Matrix (ncol = 2) with the first column pxcor and the second
column pycor representing the patches coordinates, or

AgentMatrix object representing the moving agents, or

Matrix (ncol = 2) with the first column x and the second column
y representing locations coordinates.

world

WorldMatrix or worldArray object.

torus

Logical to determine if the world is wrapped. Default is
torus = FALSE.

Value

AgentMatrix representing the turtles with updated headings.

Details

The number of agents/locations in agents2 must be equal to 1 or
to the length of turtles.

If torus = FALSE, world does not need to be provided.

If torus = TRUE and the distance from one turtles to
its corresponding agent/location agents2 is smaller around the
sides of the world than across it, then the direction to the agent/location
agents2 going around the sides of the world is given to the turtle.