Very simple question.
Working on a rather complex game. Need AGS to calculate a logarithm. Is this possible, and how?
Thanks, in advance!
It is not supported but you can compute it however it will be difficult and slow.
What do you need to calculate exactly? There might be ways to simplify till the point you don't need logarithms or can use lookup tables but it will all depend on what you need to calculate. I guess it will be messy either way but let's just say it puts the A in AGS. ;)
Well that sucks.
The game was to recalculate the distance to a given planet based on payload mass, number of booster stages and the specific impulse of each stage.
I think multistage rocket performance is calculated as:
delta-Vstage = specificimpulse(g0) × ln[ massinitial/ massfinal ]
Because there is an endless number of possible payload (and stage) masses, hard-coding is out of the question. I really was hoping to make this as authentic as possible, but I guess I'll have to just spit out magic numbers that have no basis in reality instead.
It has been implemented pretty recently, there's Maths.Log (natural logarithm) and Maths.Log10.
Ha! I was using v.3.1. Thanks Khris, now I have an excuse to go 3.2.1.
Wait, what? :D
/me crawls back to his corner.