&& aboveAnnotationThreshold == ABOVE_THRESHOLD
&& value >= ann.threshold.value)
{
- range = (value - ann.threshold.value)
+ range = ann.graphMax == ann.threshold.value ? 1f
+ : (value - ann.threshold.value)
/ (ann.graphMax - ann.threshold.value);
}
else if (thresholdIsMinMax && ann.threshold != null
&& aboveAnnotationThreshold == BELOW_THRESHOLD
&& value <= ann.threshold.value)
{
- range = (value - ann.graphMin) / (ann.threshold.value - ann.graphMin);
+ range = ann.graphMin == ann.threshold.value ? 0f
+ : (value - ann.graphMin)
+ / (ann.threshold.value - ann.graphMin);
}
else
{