mirror of
https://github.com/photonstorm/phaser
synced 2024-11-16 09:48:18 +00:00
Merge pull request #5407 from wiserim/fix-geom-intersects-triangle-to-line
Fix: TriangleToLine() not checking start / end point of line properly.
This commit is contained in:
commit
3529e2c611
1 changed files with 2 additions and 2 deletions
|
@ -4,7 +4,7 @@
|
|||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||
*/
|
||||
|
||||
var Contains = require('../triangle/Contains');
|
||||
var ContainsPoint = require('../triangle/ContainsPoint');
|
||||
var LineToLine = require('./LineToLine');
|
||||
|
||||
/**
|
||||
|
@ -23,7 +23,7 @@ var LineToLine = require('./LineToLine');
|
|||
var TriangleToLine = function (triangle, line)
|
||||
{
|
||||
// If the Triangle contains either the start or end point of the line, it intersects
|
||||
if (Contains(triangle, line.getPointA()) || Contains(triangle, line.getPointB()))
|
||||
if (ContainsPoint(triangle, line.getPointA()) || ContainsPoint(triangle, line.getPointB()))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue