Skip to content

Commit

Permalink
Fixes craftyjs#74. Corrected hashing of rotated entities.
Browse files Browse the repository at this point in the history
  • Loading branch information
degvalentine committed Jun 11, 2011
1 parent 542ad11 commit ead8559
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/HashMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ HashMap.prototype = {
};

HashMap.key = function(obj) {
if (obj.hasOwnProperty('mbr')) {
obj = obj.mbr();
}
var x1 = ~~(obj._x / cellsize),
y1 = ~~(obj._y / cellsize),
x2 = ~~((obj._w + obj._x) / cellsize),
Expand Down

0 comments on commit ead8559

Please sign in to comment.