-
Notifications
You must be signed in to change notification settings - Fork 981
Closed
Description
I think the issue is here. The incoming value is not checked for NaN, and Min() and Max() of a NaN will always return NaN
ScottPlot/src/ScottPlot5/ScottPlot5/Primitives/ExpandingAxisLimits.cs
Lines 41 to 57 in d133fb6
| /// <summary> | |
| /// Expanded limits to include the given <paramref name="x"/>. | |
| /// </summary> | |
| public void ExpandX(double x) | |
| { | |
| Left = !double.IsNaN(Left) ? Math.Min(Left, x) : x; | |
| Right = !double.IsNaN(Right) ? Math.Max(Right, x) : x; | |
| } | |
| /// <summary> | |
| /// Expanded limits to include the given <paramref name="y"/>. | |
| /// </summary> | |
| public void ExpandY(double y) | |
| { | |
| Bottom = !double.IsNaN(Bottom) ? Math.Min(Bottom, y) : y; | |
| Top = !double.IsNaN(Top) ? Math.Max(Top, y) : y; | |
| } |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels