| Conditions | 1 |
| Paths | 1 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 35 | public function interpolate($x, $y, array $elevationOnBoundingBox) |
||
| 36 | { |
||
| 37 | $this->checkArguments($x, $y, $elevationOnBoundingBox); |
||
| 38 | |||
| 39 | return (int) round( |
||
| 40 | $elevationOnBoundingBox[0] * (1 - $x) * (1 - $y) |
||
| 41 | + $elevationOnBoundingBox[1] * $x * (1 - $y) |
||
| 42 | + $elevationOnBoundingBox[2] * $y * (1 - $x) |
||
| 43 | + $elevationOnBoundingBox[3] * $x * $y |
||
| 44 | ); |
||
| 45 | } |
||
| 46 | } |
||
| 47 |