Skip to content
Browse files

Removed some accidental globals

  • Loading branch information...
1 parent 5be1d7c commit b0c634c1334b8467ba2370c087583e8221b01e56 @josephg committed Feb 7, 2013
Showing with 4 additions and 4 deletions.
  1. +3 −3 lib/chipmunk.js
  2. +1 −1 lib/cpBody.js
View
6 lib/chipmunk.js
@@ -206,9 +206,9 @@ var momentForBox = cp.momentForBox = function(m, width, height)
var momentForBox2 = cp.momentForBox2 = function(m, box)
{
- width = box.r - box.l;
- height = box.t - box.b;
- offset = vmult([box.l + box.r, box.b + box.t], 0.5);
+ var width = box.r - box.l;
+ var height = box.t - box.b;
+ var offset = vmult([box.l + box.r, box.b + box.t], 0.5);
// TODO NaN when offset is 0 and m is INFINITY
return momentForBox(m, width, height) + m*vlengthsq(offset);
View
2 lib/cpBody.js
@@ -91,7 +91,7 @@ var Body = cp.Body = function(m, i) {
// I wonder if this should use the constructor style like Body...
var createStaticBody = function()
{
- body = new Body(Infinity, Infinity);
+ var body = new Body(Infinity, Infinity);
body.nodeIdleTime = Infinity;
return body;

0 comments on commit b0c634c

Please sign in to comment.
Something went wrong with that request. Please try again.