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()); }
public virtual RGBColor scaleNew(RGBColor other) { RGBColor result = new RGBColor(red() * other.red(), green() * other.green(), blue() * other.blue()); return(result); }
public virtual void scale(RGBColor other) { set(red() * other.red(), green() * other.green(), blue() * other.blue()); }
public virtual void sub(RGBColor other) { set(red() - other.red(), green() - other.green(), blue() - other.blue()); }
public virtual void add(RGBColor other) { set(red() + other.red(), green() + other.green(), blue() + other.blue()); }
public virtual void set(RGBColor other) { set(other.red(), other.green(), other.blue()); }