-
Notifications
You must be signed in to change notification settings - Fork 982
Closed
Description
What can we do to make ScottPlot better?
Consider adding nullable annotations as they will increase productivity of using library.
This will clarify what you may expect from function.
For example:
ScottPlot/src/ScottPlot/DataGen.cs
Line 100 in 6e9a9ac
| public static int[] RandomInts(Random rand, int pointCount, double multiplier = 1, double offset = 0) |
Only those who read source code would know that they may pass null as first parameter
Or:
| public double[] MinorFromMajor(double[] majorTicks, double minorTicksPerMajorTick, double lowerLimit, double upperLimit) |
This may not be obvious that if you pass array with less than 2 elements it will return null
Is this breaking change?
No. Nullable annotation are not breaking existing code. Types remain same, but with some attributes, not changing behavior. It will work with .Net Framework, I've tested it with .Net Framework 4.0 and 4.6 in different projects
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels