public static Interpolator Create(AlgorithmType algorithm, float[] floatValues, int intValue) { Interpolator.Verify(algorithm, floatValues, intValue); var interpolator = new Interpolator(); interpolator.algorithm = algorithm; interpolator.floatValues = floatValues; interpolator.intValue = intValue; interpolator.Apply(); return(interpolator); }
public void Change(AlgorithmType algorithm, float[] floatValues, int intValue) { Interpolator.Verify(algorithm, floatValues, intValue); if (this.algorithm != algorithm) { this.Invalidate(); this.algorithm = algorithm; } else { this.isDirty = true; } this.floatValues = floatValues; this.intValue = intValue; this.Apply(); }