resqpy.olio.vector_utilities.vertical_intercept_nan¶
- resqpy.olio.vector_utilities.vertical_intercept_nan(x: float, x_value_0: float, x_value_1: float, y_value_0: float, y_value_1: float) float [source]¶
Finds the y value of a straight line between two points at a given x.
If the x value given is not within the x values of the points, returns NaN.
- Parameters
x (float) – x value at which to determine the y value
x_value_0 (np.ndarray) – the x coordinate of point 1
x_value_1 (np.ndarray) – the x coordinate of point 2
y_value_0 (np.ndarray) – the y coordinate of point 1
y_value_1 (np.ndarray) – the y coordinate of point 2
- Returns
y (float) –
- y value of the straight line segment between point 1 and point 2,
evaluated at x; if x is outside the x values range, y is NaN