Beispiel #1
0
        public UnsafeRgbColorF MultiplyBy(UnsafeRgbColorF right)
        {
            var red    = Red * right.Red;
            var green  = Green * right.Green;
            var blue   = Blue * right.Blue;
            var result = new UnsafeRgbColorF(red, green, blue);

            return(result);
        }
Beispiel #2
0
        public UnsafeRgbColorF MultiplyBy(double factor)
        {
            var red    = Red / factor;
            var green  = Green / factor;
            var blue   = Blue / factor;
            var result = new UnsafeRgbColorF(red, green, blue);

            return(result);
        }
Beispiel #3
0
        public UnsafeRgbColorF Subtract(UnsafeRgbColorF right)
        {
            var red    = Red - right.Red;
            var green  = Green - right.Green;
            var blue   = Blue - right.Blue;
            var result = new UnsafeRgbColorF(red, green, blue);

            return(result);
        }
Beispiel #4
0
        public UnsafeRgbColorF Add(UnsafeRgbColorF right)
        {
            var red    = Red + right.Red;
            var green  = Green + right.Green;
            var blue   = Blue + right.Blue;
            var result = new UnsafeRgbColorF(red, green, blue);

            return(result);
        }
Beispiel #5
0
        public UnsafeRgbColorF Apply(Func <double, double> function)
        {
            var red    = function(Red);
            var green  = function(Green);
            var blue   = function(Blue);
            var result = new UnsafeRgbColorF(red, green, blue);

            return(result);
        }
Beispiel #6
0
        public UnsafeRgbColorF DivideBy(UnsafeRgbColorF denominator)
        {
            var red    = Red / denominator.Red;
            var green  = Green / denominator.Green;
            var blue   = Blue / denominator.Blue;
            var result = new UnsafeRgbColorF(red, green, blue);

            return(result);
        }
Beispiel #7
0
        public static UnsafeRgbColorF Subtract(this double left, UnsafeRgbColorF right)
        {
            var red    = left - right.Red;
            var green  = left - right.Green;
            var blue   = left - right.Blue;
            var result = new UnsafeRgbColorF(red, green, blue);

            return(result);
        }