This is bugging me - I am working on a coding project, and can't figure it out. I know this is simple math, but it is escaping me. Maybe it's cuz I have a headache right now.
Anyways
I have two X & Y coordinates: (30, 60) and (50, 30).
If you know X, how do you solve for Y? For instance, if X = 40, Y = ?
I know my slope is -3/2 - but I dunno, I am just drawing a major blank here.
Super simple math problem
Re: Super simple math problem
Find the formulae for the slope. It will be Y=Gradient X + Constant
The gradient is -3 over 2 (you said it)
the constant will be the point at which the line intersects the Y axis.
Then insert X into the completed formulae, and it will give you Y
The gradient is -3 over 2 (you said it)
the constant will be the point at which the line intersects the Y axis.
Then insert X into the completed formulae, and it will give you Y
Eh?
Re: Super simple math problem
your function is a line, I take it ...
like geoff said, y = m * x + b, where m = (y2 - y1)/(x2 - x1)
you still need to find "b", so substitute in one of your points for x and y, determining b = 105
then for your line y = [(60 - 30)/(30 - 50)] * x + 105
y = -3/2 * x + 105
like geoff said, y = m * x + b, where m = (y2 - y1)/(x2 - x1)
you still need to find "b", so substitute in one of your points for x and y, determining b = 105
then for your line y = [(60 - 30)/(30 - 50)] * x + 105
y = -3/2 * x + 105
"I've long called these people Religious Maniacs because, of course, they are. I always point out that you don't need a god to be religious maniac; you just need a dogma and a Devil." - Ace @ Ace of SpadesHQ, 13 May 2015, 1900 hr