class PenaltyArea implements IPenaltyArea {

	@Override
	public IVector2 nearestPointOutside(final IVector2 point)
	{
		if (getRectangle().isPointInShape(point))
		{
			return point.nearestTo(
					getEdges().stream()
							.map(e -> e.closestPointOnLine(point))
							.collect(Collectors.toList()));
		}
		return point;
	}

	public  PenaltyArea(final IVector2 goalCenter, final double depth, final double length);

}