Esempio n. 1
0
        public virtual void  addLerp(float factor, RGBColor other)
        {
            float r1 = red() + factor * other.red();
            float g1 = green() + factor * other.green();
            float b1 = blue() + factor * other.blue();

            //if (r1 < 0.0f) r1 = 0.0f;
            //if (g1 < 0.0f) g1 = 0.0f;
            //if (b1 < 0.0f) b1 = 0.0f;

            set(r1, g1, b1);
            //set(red() + factor * other.red(), green() + factor * other.green(), blue() + factor * other.blue());
        }
Esempio n. 2
0
        public virtual RGBColor scaleNew(RGBColor other)
        {
            RGBColor result = new RGBColor(red() * other.red(), green() * other.green(), blue() * other.blue());

            return(result);
        }
Esempio n. 3
0
 public virtual void  scale(RGBColor other)
 {
     set(red() * other.red(), green() * other.green(), blue() * other.blue());
 }
Esempio n. 4
0
 public virtual void  sub(RGBColor other)
 {
     set(red() - other.red(), green() - other.green(), blue() - other.blue());
 }
Esempio n. 5
0
 public virtual void  add(RGBColor other)
 {
     set(red() + other.red(), green() + other.green(), blue() + other.blue());
 }
Esempio n. 6
0
 public virtual void  set(RGBColor other)
 {
     set(other.red(), other.green(), other.blue());
 }