node.Operation = function Operation(op, operands) {
    this.op = op.trim();
    this.operands = operands;
};
node.Operation.prototype.eval = function (env) {
    return this.operands[0].eval(env)[this.op](this.operands[1].eval(env));
};


node.Operation = function Operation(op, operands) {
    this.op = op.trim();
    this.operands = operands;
};
node.Operation.prototype.eval = function (env) {
    var a = this.operands[0],
        b = this.operands[1],
        temp;

    if (a instanceof node.Dimension) {
        temp = b, b = a, a = temp;
    }
    return a.eval(env).operate(this.op, b.eval(env));
};


swap operands when dimension is first, in a color operation, use new operate() function