i am trying to use an exponential to work out the distance the z coordinate would be on screen from the basic z coordinate the object is, as the further away the object is the slower the object moves away and vice versa when the object is coming closer, it speeds up. but the calculation involved in doing so requires a negative double base to double power that may or may not be a negative
Math.pow(-1.1, -(z-25))+10.8347
if i use numbers between -10 and 20 every 1.5, it gives these answers
-10.0 = -17.26773684806433
-8.5 = NaN
-7.0 = 31.948476745352608
-5.5 = NaN
-4.0 = -5.028392971714952
-2.5 = NaN
-1.0 = 22.752876537727232
0.5 = NaN
2.0 = 1.8803975674476092
3.5 = NaN
5.0 = 17.56219994932561
6.5 = NaN
8.0 = 5.780229715007055
9.5 = NaN
11.0 = 14.632198335832413
12.5 = NaN
14.0 = 7.981583293889997
15.5 = NaN
17.0 = 12.978288810000002
18.5 = NaN
20.0 = 9.22419
when using desmos, i should be getting a nice slow exponential with an answer to everyone. but here the calculation will only work the input is an even whole number, decimals give NaN and odd numbers seem to be doing their own thing so the only correct numbers here are -10, -4, 2, 8, 14, 20, putting these answers into excel with their answer shows the exponential but i would need this equation to work for pretty much all numbers.