slightlyoff/cassowary.js — pull request #46 by Timshel (2014-02-18 11:20:00+00:00)
Title: Add a correct check for number with default value

Otherwise on line 116 in Expression.js when n was 0 it was replaced by 1 and then :

var solver = new c.SimplexSolver();
var x = new c.Variable({ name: "x" });
var y = new c.Variable({ name: "y" });
solver.addConstraint( new c.Equation(x, 12));
solver.addConstraint( new c.Equation(y, new c.Expression(x).times(0)) );
solver.resolve();
console.log(x.value + " - " + y.value);

Output :

"12 - 12"