mirror of
https://github.com/liabru/matter-js.git
synced 2024-11-23 09:26:51 -05:00
fixed Query.ray, Number.MIN_VALUE seems to cause SAT.collides to fail
This commit is contained in:
parent
dae684d082
commit
ccbb98b8d0
1 changed files with 1 additions and 1 deletions
|
@ -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)),
|
||||
|
|
Loading…
Reference in a new issue