|
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;
Imagine/src/Utils/Matrix.php
Lines 169 to 176 in c10ea7f
The formula must be
return $y * $this->width + $x;