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