photonstorm/phaser — pull request #784 by woutercommandeur (2014-04-30 09:54:45+00:00)
Title: Fix pointOnLine

Corrected algorithm via: http://stackoverflow.com/questions/11907947/how-to-check-if-a-point-lays-on-a-line-between-2-provided-points

I noticed it contained a this.end.y - this.end.y which would always result to 0 in the code, then looked up correct algorithm.

This does not fix #760 (the reason I was looking into this), but maybe Phaser.Line.intersectsPoints should be using the pointOnLine functions etc to determine if the point is on the segments. Or at least the same algorithm.