From e5c72c6f464e336efaa374782dbe49504d11e4fb Mon Sep 17 00:00:00 2001 From: cosmonaut Date: Wed, 18 May 2022 18:28:53 -0700 Subject: [PATCH] add lerp to Fix64 --- src/Math/Fixed/Fix64.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Math/Fixed/Fix64.cs b/src/Math/Fixed/Fix64.cs index f9c639e1..a0d4239d 100644 --- a/src/Math/Fixed/Fix64.cs +++ b/src/Math/Fixed/Fix64.cs @@ -177,6 +177,11 @@ namespace MoonWorks.Math.Fixed return Fix64.Min(Fix64.Max(value, min), max); } + public static Fix64 Lerp(Fix64 value1, Fix64 value2, Fix64 amount) + { + return value1 + (value2 - value1) * amount; + } + // Trigonometry functions ///