lerp static method
If both are null
, returns null
.
If either is null
, replaced with Peek.NONE.
Implementation
static Peek? lerp(Peek? a, Peek? b, double t) {
if (a == null && b == null) return null;
a ??= Peek.NONE;
b ??= Peek.NONE;
return Peek(
peek: lerpDouble(a.peek, b.peek, t)!,
peekRatio: lerpDouble(a.peekRatio, b.peekRatio, t)!,
peekAlignment:
AlignmentGeometry.lerp(a.peekAlignment, b.peekAlignment, t)!,
);
}