@@ 15-23 (lines=9) @@ | ||
12 | * @param array $coords |
|
13 | * @return mixed |
|
14 | */ |
|
15 | public function getLength($type = 'x', array $coords) |
|
16 | { |
|
17 | $type = strtolower($type); |
|
18 | if ($type == 'x') { |
|
19 | return $coords[2] - $coords[0]; |
|
20 | } else { |
|
21 | return $coords[3] - $coords[1]; |
|
22 | } |
|
23 | } |
|
24 | } |
@@ 262-270 (lines=9) @@ | ||
259 | * @param array $coords |
|
260 | * @return mixed |
|
261 | */ |
|
262 | protected function getLength($type = 'x', array $coords) |
|
263 | { |
|
264 | $type = strtolower($type); |
|
265 | if ($type == 'x') { |
|
266 | return $coords[2] - $coords[0]; |
|
267 | } else { |
|
268 | return $coords[3] - $coords[1]; |
|
269 | } |
|
270 | } |
|
271 | } |