Conditions | 1 |
Paths | 1 |
Total Lines | 12 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
7 | public static function apply(Edge $edge) |
||
8 | { |
||
9 | $grid = $edge->luma; |
||
10 | $vertical = |
||
11 | abs(($grid->northWest / 4) - ($grid->north / 2) + ($grid->northEast / 4)) + |
||
12 | abs(($grid->west / 2) - $grid->center + ($grid->east / 2)) + |
||
13 | abs(($grid->southWest) / 4) - ($grid->south / 2) + ($grid->southEast / 4); |
||
14 | $horizontal = |
||
15 | abs(($grid->northWest / 4) - ($grid->west / 2) + ($grid->southWest / 4)) + |
||
16 | abs(($grid->north / 2) - $grid->center + ($grid->south / 2)) + |
||
17 | abs(($grid->northEast / 4) - ($grid->east / 2) + ($grid->southEast / 4)); |
||
18 | $edge->horizontal = $horizontal >= $vertical; |
||
19 | } |
||
21 |