| @@ 145-147 (lines=3) @@ | ||
| 142 | private function determineCoordinateIndices($index, $length) |
|
| 143 | { |
|
| 144 | // i = N-2 |
|
| 145 | if ($index === ($length - 2)) { |
|
| 146 | return [$length - 2, $length - 1, 0]; |
|
| 147 | } |
|
| 148 | ||
| 149 | // i = N-1 |
|
| 150 | if ($index === ($length - 1)) { |
|
| @@ 150-152 (lines=3) @@ | ||
| 147 | } |
|
| 148 | ||
| 149 | // i = N-1 |
|
| 150 | if ($index === ($length - 1)) { |
|
| 151 | return [$length - 1, 0, 1]; |
|
| 152 | } |
|
| 153 | ||
| 154 | // i = 0 to N-3 |
|
| 155 | return [$index, $index + 1, $index + 2]; |
|