Watch
2
0
Fork
You've already forked raylib-cs
0

Fix Color.Lerp

Resolves incorrect tweening behavior where G/B/A interpolated from origin.R
This commit is contained in:
Guillaume 2026-02-04 11:49:52 +01:00
commit f224ff62dc

View file

@ -210,9 +210,9 @@ public struct Color
public static Color Lerp(Color origin, Color target, float t)
{
byte r = LerpB(origin.R, target.R, t);
byte g = LerpB(origin.R, target.G, t);
byte b = LerpB(origin.R, target.B, t);
byte a = LerpB(origin.R, target.A, t);
byte g = LerpB(origin.G, target.G, t);
byte b = LerpB(origin.B, target.B, t);
byte a = LerpB(origin.A, target.A, t);
return new Color(r, g, b, a);
}