photonstorm/phaser — pull request #766 by vilcans (2014-04-27 06:40:53+00:00)
Title: Polygon.contains returns true for  points to the left of the polygon

Test case:

var game = new Phaser.Game(600, 400);
var poly = new Phaser.Polygon(
50, 0,
100, 0,
100, 50,
50, 50
);
var contains = poly.contains(40, 25);
console.log('Contains?', contains, '(should be false)');

Some optimization gone wrong maybe when porting PIXI.Polygon maybe?

Anyway, a simple fix.