Description Usage Arguments Value Examples
Uses the Pythagorean theorem to calculate the strightline distance between two matrix cells.
1 | matrixPythagoras(position1, position2, matsize)
|
position1 |
integer, first positions in distance calc - must be supplied as cell ID |
position2 |
integer, second positions in distance calc - must be supplied as cell ID #' @param matsize integer, the size in number of cells of one side of the square matrix on which the simulation is being run. |
returns the pythogorean distance between two coordinates (supplied as matirx indices)
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.