Jump to content

linerization formula


Recommended Posts

My educated guess would be:

y = (((y2 - y1) * (x - x1)) / (x2 - x1)) + y1

Note that all the intermediate calculations are made in 32 bit integers, and if those calculations exceed the 32 bit signed integer range, the "y" result will be random, as none of the intermediate calculations are bounds-checked for overflow.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.