Im programming a function but I just cant structure the equation. I think this is the right place to ask since the problem is completely mathematics.
Let me explain three scenarios.
There are 4 variables.
X, Y, Z and P. They all depend on each other.
X is the sum of Y * 1200.
So if Y is 3, X = 3600.
Z is known, decreasing by -1200. 0, -1200, -3600, -4800 etc..
P is unknown
Im trying to solve P, but first i need to structure the equation. Ill give it 3 scenarios with these variables:
X = 3600
Y = 3
- If
Z = 0P = 1. - If
Z = -1200P = 2 - If
Z = -2400P = 3
So I want a equation that sets P to a number as above.
God this is hard to explain. I hope someone gets it! Please comment if u have any questions.
Im also new to this community so please let me know if Im doing something wrong in my question!
Thanks in advance!