Linear scaling in PICC

Status
Not open for further replies.

mrcube_ns

Advanced Member level 1
Joined
Apr 10, 2002
Messages
452
Helped
48
Reputation
96
Reaction score
34
Trophy points
1,308
Location
Europe
Activity points
3,813
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
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…