Making x the subject of the formula / Re-arranging formula - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Making x the subject of the formula / Re-arranging formula (
/showthread.php?tid=484779)
Making x the subject of the formula / Re-arranging formula -
Kyle - 01.01.2014
How can I make it so that 'fX ' is the subject. So for example I mean this: fX = offsets * x;
afaik that isn't correct, but that is what I want, but the correct one! xD
Code:
offsets[0] = fX - x;
Re: Making x the subject of the formula / Re-arranging formula -
Threshold - 01.01.2014
I'm a little confused, what exactly do you want fX to be?
In the equation 'offsets[0] = fX - x;', 'fX = offsets[0] + x'.
Are you trying to get 'fX = offsets * x' ??
Re: Making x the subject of the formula / Re-arranging formula -
Sinner - 01.01.2014
Just bring fX to the other side of the equation:
pawn Code:
a = b - c
// Is the same as
b = a + c
// Which means
-fX = -x + offsets[0]
// - cancel eachother out
fX = x + offsets[0]