And neither can we see the call arguments, but we may assume they are (float, float, tuple of floats).
Myself would have been content to stick with (x, y) for less verbosity. If we know the math, we know the symbols.
y = mx + b
m = (y2 - y1) / (x2 - x1)
(in framing carpentry this is called rise over run)
b = A_CONSTANT
namely, the y-intercept.
What’s throwing me off is the variable
distance. It should resolve to two vectors, change in y, and change in x. Those values can be resolved to a vector length using the distance formula, which is essentially Pythagorean so that,
Delta x squared + Delta y squared all raised to the one-half
equals distance between (x1, y1) and (x2, y2).