mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
[apps/calculation] additional_outputs: fix complex range for infinite
values
This commit is contained in:
@@ -17,10 +17,10 @@ float ComplexModel::rangeBound(float direction, bool horizontal) const {
|
||||
maxFactor = k_maxHorizontalMarginFactor;
|
||||
value = real();
|
||||
}
|
||||
if (std::isnan(value) || std::isinf(value) || value == 0.0f) {
|
||||
return direction*maxFactor;
|
||||
}
|
||||
float factor = direction*value >= 0.0f ? maxFactor : minFactor;
|
||||
if (std::isnan(value) || std::isinf(value) || value == 0.0f) {
|
||||
return direction*factor;
|
||||
}
|
||||
return factor*value;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user