Fix Color.Lerp (#323)
Resolves incorrect tweening behavior where G/B/A interpolated from origin.R
This commit is contained in:
parent
95d1e9cc56
commit
7db9848fb2
1 changed files with 3 additions and 3 deletions
|
|
@ -210,9 +210,9 @@ public struct Color
|
||||||
public static Color Lerp(Color origin, Color target, float t)
|
public static Color Lerp(Color origin, Color target, float t)
|
||||||
{
|
{
|
||||||
byte r = LerpB(origin.R, target.R, t);
|
byte r = LerpB(origin.R, target.R, t);
|
||||||
byte g = LerpB(origin.R, target.G, t);
|
byte g = LerpB(origin.G, target.G, t);
|
||||||
byte b = LerpB(origin.R, target.B, t);
|
byte b = LerpB(origin.B, target.B, t);
|
||||||
byte a = LerpB(origin.R, target.A, t);
|
byte a = LerpB(origin.A, target.A, t);
|
||||||
return new Color(r, g, b, a);
|
return new Color(r, g, b, a);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue