public double Sample(double value) { for (int i = 1; i < _Keyframes.Length; i++) { if (value < _Keyframes[i].position) { return(MathExtension.MapRange(value, _Keyframes[i - 1].position, _Keyframes[i].position, _Keyframes[i - 1].value, _Keyframes[i].value)); } } return(1); }
public double MapHeight(double x, double min, double max) => MathExtension.MapRange(x, min, max, top, bottom);
public double MapWidth(double x, double min, double max) => MathExtension.MapRange(x, min, max, left, right);