GitUI.RevisionGrid.Lerp C# (CSharp) 메소드

Lerp() 개인적인 정적인 메소드

private static Lerp ( Color colour, Color to, float amount ) : Color
colour Color
to Color
amount float
리턴 Color
        private static Color Lerp(Color colour, Color to, float amount)
        {
            // start colours as lerp-able floats
            float sr = colour.R, sg = colour.G, sb = colour.B;

            // end colours as lerp-able floats
            float er = to.R, eg = to.G, eb = to.B;

            // lerp the colours to get the difference
            byte r = (byte)Lerp(sr, er, amount),
                 g = (byte)Lerp(sg, eg, amount),
                 b = (byte)Lerp(sb, eb, amount);

            // return the new colour
            return Color.FromArgb(r, g, b);
        }

Same methods

RevisionGrid::Lerp ( float start, float end, float amount ) : float
RevisionGrid