Skip to content

Commit

Permalink
tweak to random gravity creation
Browse files Browse the repository at this point in the history
  • Loading branch information
kevmoo committed Aug 23, 2011
1 parent 6d88833 commit 8bfe64a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions public/javascripts/eightball/PoolTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -631,9 +631,7 @@ eightball.PoolTable.prototype.randomGravity = function(opt_enabled) {
if (Boolean(opt_enabled)) {
var vec;
if (opt_enabled) {
vec = new box2d.Vec2(Math.random() - 0.5, Math.random() - 0.5);
vec.Normalize();
vec.scale(100);
vec = goog.math.Vec2.randomUnit().scale(100);
}
else {
vec = new box2d.Vec2();
Expand Down

0 comments on commit 8bfe64a

Please sign in to comment.