@Test
public void testIsOnEdge() {

	Polygon rectangle=new Polygon(0, new Vector3(0, 0), new Vector3(1, 0), new Vector3(1, 1),new Vector3(0,1 ));
	
	Assert.assertTrue(rectangle.isOnEdge(new Vector3(0, 0)));
	Assert.assertTrue(rectangle.isOnEdge(new Vector3(0.5f, 0)));
	Assert.assertTrue(rectangle.isOnEdge(new Vector3(1, 0)));
	Assert.assertTrue(rectangle.isOnEdge(new Vector3(1, 0.4f)));
	Assert.assertTrue(rectangle.isOnEdge(new Vector3(1, 1)));
	Assert.assertTrue(rectangle.isOnEdge(new Vector3(0.5f, 1f)));
	Assert.assertTrue(rectangle.isOnEdge(new Vector3(0, 1)));
	Assert.assertTrue(rectangle.isOnEdge(new Vector3(0, 0.5f)));
	Assert.assertTrue(rectangle.isOnEdge(new Vector3(0, 0.5f)));
	Assert.assertFalse(rectangle.isOnEdge(new Vector3(0.5f, 0.5f)));
	Assert.assertFalse(rectangle.isOnEdge(new Vector3(2, 0.5f)));
	
	for(int i=0;i<100000000;i++) {
		rectangle.isOnEdge(new Vector3(1, 0.4f));
	}
	
}