mirror of
https://github.com/photonstorm/phaser
synced 2025-02-17 06:28:30 +00:00
stop travis complaints
This commit is contained in:
parent
37dcfce628
commit
5ebacd0b30
1 changed files with 3 additions and 3 deletions
|
@ -380,9 +380,9 @@ Phaser.Line.intersectsPoints = function (a, b, e, f, asSegment, result) {
|
|||
|
||||
if (asSegment)
|
||||
{
|
||||
var u_b = ((f.y-e.y)*(b.x-a.x) - (f.x-e.x)*(b.y- a.y));
|
||||
var ua = (((f.x-e.x)*(a.y-e.y)) - (f.y-e.y)*(a.x-e.x)) / u_b;
|
||||
var ub = (((b.x- a.x)*(a.y- e.y)) - ((b.y-a.y)*(a.x- e.x))) / u_b;
|
||||
var uc = ((f.y-e.y)*(b.x-a.x) - (f.x-e.x)*(b.y- a.y));
|
||||
var ua = (((f.x-e.x)*(a.y-e.y)) - (f.y-e.y)*(a.x-e.x)) / uc;
|
||||
var ub = (((b.x- a.x)*(a.y- e.y)) - ((b.y-a.y)*(a.x- e.x))) / uc;
|
||||
if (ua >=0 && ua<=1 && ub >=0 && ub <=1) {
|
||||
return result;
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue