Stop reinventing lerp() all over the place.

This commit is contained in:
Mari the Deer 2022-05-29 18:07:30 +02:00
commit 65597c181a
10 changed files with 38 additions and 31 deletions

View file

@ -233,7 +233,14 @@ Class SWWMUtility
{
return a*(1.-theta)+b*theta;
}
static clearscope Vector3 LerpVector3( Vector3 a, Vector3 b, double theta )
{
return a*(1.-theta)+b*theta;
}
static clearscope Vector2 LerpVector2( Vector2 a, Vector2 b, double theta )
{
return a*(1.-theta)+b*theta;
}
static clearscope Color LerpColor( Color a, Color b, double theta )
{
Color c = Color(