/*jshint bitwise:false*/
'use strict';

var lerp = require( './utils' ).lerp;

// RGB values are ints from [0, 255].
function Color( r, g, b ) {
  this.r = r || 0;
  this.g = g || 0;
  this.b = b || 0;
}

Color.prototype.toString = function() {
  return 'rgb(' +
    ( this.r | 0 ) + ', ' +
    ( this.g | 0 ) + ', ' +
    ( this.b | 0 ) +
  ')';
};

Color.prototype.lerp = function( color, alpha ) {
  this.r = lerp( this.r, color.r, alpha );
  this.g = lerp( this.g, color.g, alpha );
  this.b = lerp( this.b, color.b, alpha );
  return this;
};

Color.prototype.copy = function( color ) {
  this.r = color.r;
  this.g = color.g;
  this.b = color.b;
  return this;
};

module.exports = Color;

@@ -340,24 +340,390 @@
 %0A  ')';%0A%7D;%0A%0A
+Color.prototype.add = function( color ) %7B%0A  this.r += color.r;%0A  this.g += color.g;%0A  this.b += color.b;%0A  return this;%0A%7D;%0A%0AColor.prototype.multiply = function( color ) %7B%0A  this.r *= color.r;%0A  this.g *= color.g;%0A  this.b *= color.b;%0A  return this;%0A%7D;%0A%0AColor.prototype.multiplyScalar = function( s ) %7B%0A  this.r *= s;%0A  this.g *= s;%0A  this.b *= s;%0A  return this;%0A%7D;%0A%0A
 Color.protot

Add Color math operations (add, multiply, multiplyScalar).