0
0
Fork 0
mirror of https://github.com/liabru/matter-js.git synced 2024-11-27 09:50:52 -05:00

fixed Query.ray, Number.MIN_VALUE seems to cause SAT.collides to fail

This commit is contained in:
liabru 2015-04-26 19:44:32 +01:00
parent dae684d082
commit ccbb98b8d0

View file

@ -18,7 +18,7 @@ var Query = {};
* @return {object[]} Collisions
*/
Query.ray = function(bodies, startPoint, endPoint, rayWidth) {
rayWidth = rayWidth || Number.MIN_VALUE;
rayWidth = rayWidth || 1e-100;
var rayAngle = Vector.angle(startPoint, endPoint),
rayLength = Vector.magnitude(Vector.sub(startPoint, endPoint)),