default int interpolate(int w, double val) {
		Span<Double, ?> fullRangeDouble = getFullRangeDouble();
		double span = getSpan();
		double lower = fullRangeDouble.min();
		if (val <= lower) {
			return 0;
		}
		if (val >= fullRangeDouble.max()) {
			return w;
		}
		double dif = val - lower;
		return (int) (dif / span * w);
	}
Compute the horizontal pixel position of the given value

<p>
This interpolates the given value linearly mapping it to a pixel. Pixel 0 is at the full
span's lower endpoint and pixel {@code w} is at the full span's upper endpoint. If the given
value falls outside the full span, it is clamped.

@param w the width of the viewport in pixels, i.e., {@link #getWidth()}
@param val the value as in the span's domain, but as a double
@return the horizontal pixel
Ghidra/Debug/ProposedUtils/src/main/java/docking/widgets/table/SpannedRenderer.java