Skip to content

Commit

Permalink
A simpler "add" method that takes multiple constraints and adds them …
Browse files Browse the repository at this point in the history
…in order.
  • Loading branch information
slightlyoff committed Jun 10, 2012
1 parent 94dd6eb commit 251a726
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/SimplexSolver.js
Expand Up @@ -57,6 +57,13 @@ c.SimplexSolver = c.inherit({
return this;
},

add: function(/*c.Constraint, ...*/) {
for (var x = 0; x < arguments.length; x++) {
this.addConstraint(arguments[x]);
}
return this;
},

addConstraint: function(cn /*c.Constraint*/) {
// console.log("addConstraint: " + cn);
if (c.trace) c.fnenterprint("addConstraint: " + cn);
Expand Down

0 comments on commit 251a726

Please sign in to comment.