public void setMaximumDepth(float m) {
		if (m < 0.0f)
			throw new IllegalArgumentException("Potential well depth cannot be negative");
		v1 *= max / m;
		max = m;
		if (format != null) {
			if (max >= 1000f)
				format.applyPattern("####");
			else if (max >= 100f)
				format.applyPattern("###");
			else if (max >= 10f)
				format.applyPattern("##.#");
			else if (max >= 1f)
				format.applyPattern("#.##");
			else if (max >= 0.1f)
				format.applyPattern("#.###");
			else if (max >= 0.01f)
				format.applyPattern("#.####");
			else if (max >= 0.001f)
				format.applyPattern("#.#####");
		}
	}