Esempio n. 1
0
 /// <summary>
 /// Hurr derp
 /// </summary>
 internal static System.Drawing.Color ColourLerp(System.Drawing.Color first, System.Drawing.Color second, float weight)
 {
     return(System.Drawing.Color.FromArgb((byte)OsuMathHelper.Lerp((float)first.A, (float)second.A, weight),
                                          (byte)OsuMathHelper.Lerp((float)first.R, (float)second.R, weight),
                                          (byte)OsuMathHelper.Lerp((float)first.G, (float)second.G, weight),
                                          (byte)OsuMathHelper.Lerp((float)first.B, (float)second.B, weight)));
 }
Esempio n. 2
0
 /// <summary>
 /// Hurr derp
 /// </summary>
 internal static Color ColourLerp(Color first, Color second, float weight)
 {
     return(new Color((byte)OsuMathHelper.Lerp((float)first.R, (float)second.R, weight),
                      (byte)OsuMathHelper.Lerp((float)first.G, (float)second.G, weight),
                      (byte)OsuMathHelper.Lerp((float)first.B, (float)second.B, weight),
                      (byte)OsuMathHelper.Lerp((float)first.A, (float)second.A, weight)));
 }