Generate a projection of an edge of the polygon on a given axis

Property definitions

geometry $ APolygon :: project
	# Generate a projection of an edge of the polygon on a given axis
	private fun project(axis: Point[Float]): Projection do
		var min = axis.x * points[0].x + axis.y * points[0].y
		var max = min
		for i in [0..points.length[ do
			var p = axis.x * points[i].x + axis.y * points[i].y
			if p < min then min = p
			if p > max then max = p
		end
		var projection = new Projection(min, max)
		return projection
	end
lib/geometry/polygon.nit:124,2--135,4