Fix min/max mixup

This commit is contained in:
Ruben 2016-09-17 19:45:02 +01:00
parent 2fcfd61c5a
commit 2cedc5e0c3

View file

@ -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";
} }
} }