This repository was archived by the owner on Nov 19, 2020. It is now read-only.

Description
Once a Polynomial kernel has been created with the default degree of zero, this can never be changed. Trivial example:
public static void Main(string[] args)
{
var polynomial = new Polynomial();
polynomial.Degree = 3;
}
Expected result: polynomial degree is changed to 3 as that is a valid value.
Actual result: System.ArgumentOutOfRangeException 'Degree must be positive'
Fairly obviously being caused by the check at Polynomial.cs:72:
if (degree <= 0)
throw new ArgumentOutOfRangeException("value", "Degree must be positive.");
and the obvious fix would be to make the check be on value (the new value) rather than degree (the old value). I'll make a PR if you want one, but doesn't really seem worth it for such a small change.