Returns the axes corresponding to the edges of the polygon, used for collision detection

Property definitions

geometry $ APolygon :: axes
	# Returns the axes corresponding to the edges of the polygon, used for collision detection
	private fun axes: Array[Point[Float]] do
		var axes = new Array[Point[Float]]
		for i in [0..points.length[ do
			var p1 = new Point[Float](points[i].x, points[i].y)
			var p2 = new Point[Float](points[(i+1) % points.length].x, points[(i+1) % points.length].y)
			var edge = new Point[Float](p1.x - p2.x, p1.y - p2.y)
			var normal = new Point[Float](-edge.y, edge.x)
			axes[i] = normal
		end
		return axes
	end
lib/geometry/polygon.nit:51,2--62,4