mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
17 lines
409 B
Dart
17 lines
409 B
Dart
// Copyright 2015 The Chromium Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
part of dart.ui;
|
|
|
|
/// Linearly interpolate between two numbers.
|
|
double lerpDouble(num a, num b, double t) {
|
|
if (a == null && b == null)
|
|
return null;
|
|
if (a == null)
|
|
a = 0.0;
|
|
if (b == null)
|
|
b = 0.0;
|
|
return a + (b - a) * t;
|
|
}
|