-
Notifications
You must be signed in to change notification settings - Fork 530
Open
Description
Lines 169 to 176 in c10ea7f
| protected function calculatePosition($x, $y) | |
| { | |
| if ($x < 0 || $y < 0 || $this->width <= $x || $this->height <= $y) { | |
| throw new OutOfBoundsException(sprintf('There is no position (%s, %s) in this matrix', $x, $y)); | |
| } | |
| return $y * $this->height + $x; | |
| } |
The formula must be return $y * $this->width + $x;
ausi and mlocati
Metadata
Metadata
Assignees
Labels
No labels