Пример #1
0
        public static QuadColor operator -(QuadColor A, QuadColor B)
        {
            QuadColor quadColor = new QuadColor(A.A - B.A, A.R - B.R, A.G - B.G, A.B - B.B);

            quadColor.ClampToMin();
            return(quadColor);
        }
Пример #2
0
        public QuadColor Lerp(QuadColor A, double dist)
        {
            QuadColor result = new QuadColor((A.R - this.R) * dist + this.R,
                                             (A.G - this.G) * dist + this.G,
                                             (A.B - this.B) * dist + this.B,
                                             (A.A - this.A) * dist + this.A
                                             );

            result.ClampToMin();
            result.ClampToMax();
            return(result);
        }