distanceToClosestTrap {LobsterCatch} | R Documentation |
The function finds the closest trap to a lobster and calculates the distance.
distanceToClosestTrap(Lobster, Trap)
Lobster |
location of lobster in the arena |
Trap |
location of trap in the arena |
Returns distance to closest trap and saves the trap number in case of multiple traps.