Hacker News new | past | comments | ask | show | jobs | submit login

You want a linear function f(x) such that f(a)=A and f(b)=B given a, b, A, B. A valid f(x) (actually it's the only one) is defined as

             x-b     x-a
    f(x) = A --- + B ---
             a-b     b-a
You can calculate f(a) and f(b) to confirm that it works.

However, I don't find this kind of guide any good for learning math...




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: