Fix min/max mixup
This commit is contained in:
parent
2fcfd61c5a
commit
2cedc5e0c3
1 changed files with 2 additions and 1 deletions
|
@ -285,7 +285,8 @@ class ScoreControllerProvider implements ControllerProviderInterface
|
||||||
foreach($conversions as $from => $to) {
|
foreach($conversions as $from => $to) {
|
||||||
$value = $hit->getExpressions()->getExpressionScore($from) / 100;
|
$value = $hit->getExpressions()->getExpressionScore($from) / 100;
|
||||||
foreach($to as $t) {
|
foreach($to as $t) {
|
||||||
$data['unit_poses'][$t] = isSet($data['unit_poses'][$t]) ? max(1,$data['unit_poses'][$t]+$value) : $value;
|
$data['unit_poses'][$t] = isSet($data['unit_poses'][$t]) ? min(1,$data['unit_poses'][$t]+$value) : $value;
|
||||||
|
// $data['description'] .= " $from => $t";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue