class VectorMath {

	static IVector2 nearestTo(final IVector2 p, final Collection<IVector2> points)
	{
		Validate.notEmpty(points);
		IVector2 closest = null;
		double closestDist = Double.MAX_VALUE;
		for (IVector2 vec : points)
		{
			double dist = distancePPSqr(vec, p);
			if (closestDist > dist)
			{
				closestDist = dist;
				closest = vec;
			}
		}
		Validate.notNull(closest);
		return closest;
	}

	@SuppressWarnings("unused") private  VectorMath();

}