linear method
It applies the Linear Interpolation formula [click to read more about it
](https://www.cuemath.com/linear-interpolation-formula/)
It can be used to create animations example:
F(x) = y0 + ((y1 - y0) / (x1 - x0)) * (x - x0);
Implementation
double linear(
double x, {
required double begin,
required double end,
}) {
return begin + ((end - begin) / (this.end - this.begin)) * (x - this.begin);
}