mrcube_ns
Advanced Member level 1

Hi all,
I need linear scaling function writen in C for PIC16F871:
y=((y2-y1)/(x2-x1))*(x-x1)+y1
I never work with floats, and with integer math this cannot be implement to work OK.
Please HELP.
THANKS IN ADVANCE!!!
Mr.Cube
I need linear scaling function writen in C for PIC16F871:
y=((y2-y1)/(x2-x1))*(x-x1)+y1
I never work with floats, and with integer math this cannot be implement to work OK.
Please HELP.
THANKS IN ADVANCE!!!
Mr.Cube