public void should_correctly_calculate_logit_curve_value(float slope, float xShift, float yShift, float inputValue, float expectedValue) { var curve = new LogitCurveFunction(slope, xShift, yShift); var actualValue = curve.Plot(inputValue); Assert.Equal(expectedValue.ToString("F"), actualValue.ToString("F")); }
public static LogitCurveFunction Alter(this LogitCurveFunction curve, float?slope = null, float?xShift = null, float?yShift = null) { return(new LogitCurveFunction( slope.HasValue ? slope.Value : curve.Slope, xShift.HasValue ? xShift.Value : curve.XShift, yShift.HasValue ? yShift.Value : curve.YShift )); }