public Vector2 getZInterval(int xPosition, int yPosition, int width, int height)
	{
		// The min and max values.
		double min = Double.MAX_VALUE;
		double max = Double.MIN_VALUE;

		// Iterate through all pixels in the sprite.
		for (int y = yPosition; y < height; y++)
		{
			for (int x = xPosition; x < width; x++)
			{
				// Get the z value.
				double z = getZ(x, y);

				// Determine if the min and max values have changed.
				min = (z < min) ? z : min;
				max = (z > max) ? z : max;
			}
		}

		// Return the interval.
		return new Vector2(min, max);
	}