Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The result will be NaN, if dx1===0 (GetLineToLine.js) #6579

Closed
finscn opened this issue Aug 14, 2023 · 1 comment · May be fixed by jonesrussell/nishman#6
Closed

The result will be NaN, if dx1===0 (GetLineToLine.js) #6579

finscn opened this issue Aug 14, 2023 · 1 comment · May be fixed by jonesrussell/nishman#6

Comments

@finscn
Copy link

finscn commented Aug 14, 2023

https://github.com/photonstorm/phaser/blob/c5d53f9e94928746770176ea1db3d29b495b9b05/src/geom/intersects/GetLineToLine.js#L66

if (x3 + dx2 * t - x1)===0 and dx1 === 0, u & s will be NaN.
then the out.x & out.y will be NaN

@zekeatchan
Copy link
Collaborator

This issue has been resolved.

We have investigated the problem and have implemented a solution to check whenever dx1 or dy1 values are zero.

The fix will be reflected in the next Phaser update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants