| 1 | <?php |
||
| 14 | class HeatIndex |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * Температура в целсиях |
||
| 18 | * @var float |
||
| 19 | */ |
||
| 20 | protected $temp = null; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Коофецент влажность 0 < $humidity < 1 |
||
| 24 | * @var float |
||
| 25 | */ |
||
| 26 | protected $dewPoint = null; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @return float |
||
| 30 | */ |
||
| 31 | 2 | public function getTemp(): float |
|
| 35 | |||
| 36 | /** |
||
| 37 | * @param float $temp |
||
| 38 | */ |
||
| 39 | 2 | public function setTemp(float $temp): self |
|
| 44 | |||
| 45 | /** |
||
| 46 | * @return float |
||
| 47 | */ |
||
| 48 | 2 | public function getDewPoint(): float |
|
| 52 | |||
| 53 | /** |
||
| 54 | * @param float $dewPoint |
||
| 55 | */ |
||
| 56 | 2 | public function setDewPoint(float $dewPoint): self |
|
| 61 | |||
| 62 | /** |
||
| 63 | * <table border="1"> |
||
| 64 | <tr><td><strong>Humidex Range</strong></td><td><strong>Degree of Comfort</strong></td></tr> |
||
| 65 | <tr><td>20-29</td><td style="color: #4CD900;">Comfortable</td></tr> |
||
| 66 | <tr><td>30-39</td><td style="color: #FFD800;">Some Discomfort</td></tr> |
||
| 67 | <tr><td>40-45</td><td style="color: #FF6A00;">Great Discomfort</td></tr> |
||
| 68 | <tr><td>>45</td><td style="color: #FF0000;">Dangerous</td></tr> |
||
| 69 | </table> |
||
| 70 | * |
||
| 71 | * @return float |
||
| 72 | */ |
||
| 73 | 1 | public function calc(): float |
|
| 82 | |||
| 83 | } |
||
| 84 |