Learn R Programming

LobsterCatch (version 0.1.0)

distanceToTrapCalculator: This function calculates the Euclidean distance between Trap(s) and each lobster. The function is internally called in distanceToClosestTrap function.

Description

This function calculates the Euclidean distance between Trap(s) and each lobster. The function is internally called in distanceToClosestTrap function.

Usage

distanceToTrapCalculator(Lobster, Trap)

Value

Returns the distance to trap.

Arguments

Lobster

location of lobster in the grid in x and y coordinates.

Trap

location of trap in the grid in x and y coordinates.