| Аргумент | Возможный тип | Описание |
| $value | — | — |
| $from | — | — |
| $to | — | — |
if ($from == $to) {
return $value;
}
if (isset($this->weights[$from])) {
$from = $this->weights[$from]['value'];
} else {
$from = 0;
}
if (isset($this->weights[$to])) {
$to = $this->weights[$to]['value'];
} else {
$to = 0;
}
return $value * ($to / $from);