Calculate value on an axis I have a diagonal axis which starts at 362 and ends at -3831.
I have a horizontal axis which starts at 67 and ends at 1027.

Is there a way to create a single formula where 67 generates 362, and 1027 generates -3831
I need the formula to calculate all points in between.
I'm really struggling to find any equation that satisfies both
Edit
I'm looking for an equation I can convert for programming
 A: Consider $( 362,67), (1027,-3831)$ as coupled coordinates of a single points, which can be changed between limits by a single parameter $t$ in formula.

$$ X(t) = ( 362,67)(1 - t) + (1027,-3831) t $$

When $t=0$ you have the first point and when $t=1$, the second.When $ t= \frac12,$ it is the center point for both lines.
A: Given two real numbers $a,b$, you can obtain any value between them by taking $(1-t)a+t b$, with $t\in[0,1]$.
Thus, if you have a second pair of numbers $c,d$, and you want to take the number between them in a proportional way, you just need the $t$ of the first formula.
That is, given $n\in[a,b]$:
$$n = (1-t)a+t b\quad\text{for certain }n \Rightarrow t=\frac{n-a}{b-a}$$
So the corresponding value $n'$ in the second interval is:
$$n' = (1-t)c+td = \left(1-\frac{n-a}{b-a}\right)c+\frac{n-a}{b-a} d$$

EDIT: This is quite simple to be coded for programming:
a = 67; b = 1027;
c = 362; d = -3831;
number_in_a_b = whatever;
t = (number_in_a_b-a)/(b-a);
number_in_c_d = (1-t)*c + t*d;

They are just basic operations, so you can easily adapt it to your preferred language.
