• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5part of ui;
6
7/// Linearly interpolate between two numbers.
8double lerpDouble(num a, num b, double t) {
9  if (a == null && b == null) {
10    return null;
11  }
12  a ??= 0.0;
13  b ??= 0.0;
14  return a + (b - a) * t;
15}
16