ColorScale.prototype.vectorMult = function (vector, num) { var result = []; for (var i = 0; i < vector.length; i++) { result[i] = vector[i] * num; } return result; };
info at phpclasses dot org