Use `Interpolation.Lerp`

This commit is contained in:
Opelkuh 2021-09-19 15:06:15 +02:00
parent 0b593fac5c
commit 9c90dd539f
1 changed files with 3 additions and 2 deletions

View File

@ -9,6 +9,7 @@
using osu.Framework.Graphics.Primitives;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Textures;
using osu.Framework.Utils;
using osuTK;
namespace osu.Game.Graphics
@ -179,9 +180,9 @@ protected struct FallingParticle
public float AlphaAtTime(float timeSinceStart) => 1 - progressAtTime(timeSinceStart);
public float ScaleAtTime(float timeSinceStart) => 1 + (EndScale - 1) * progressAtTime(timeSinceStart);
public float ScaleAtTime(float timeSinceStart) => (float)Interpolation.Lerp(1, EndScale, progressAtTime(timeSinceStart));
public float AngleAtTime(float timeSinceStart) => StartAngle + (EndAngle - StartAngle) * progressAtTime(timeSinceStart);
public float AngleAtTime(float timeSinceStart) => (float)Interpolation.Lerp(StartAngle, EndAngle, progressAtTime(timeSinceStart));
public Vector2 PositionAtTime(float timeSinceStart, float gravity, float maxDuration)
{