lerp static method

Layout lerp(
  1. Layout from,
  2. Layout to,
  3. double f
)

Implementation

static Layout lerp(Layout from, Layout to, double f) {
  double fi = 1.0 - f;
  return Layout(to.left * f + from.left * fi, to.top * f + from.top * fi,
      to.width * f + from.width * fi, to.height * f + from.height * fi);
}