I see that the climate of a planet is stored as
wPlanet = 100 - temperature
for some reason.
Part of the native growth formula is
sin(temp/100 * PI)
which is the same for say 25 and 100-25=75.
But instead of PI, a different value is used in Phost:
3.14159. That results in slightly different numbers. Stats
actually uses M_PI, which I don't see defined anywhere. Ah,
it is a C default at 3.14159265358979323846. That will also
give slightly different values.
Can someone confirm that the off-by-one errors are gone when
this new information is used? (I haven't changed any code.)
If not, please give an example of a calculation that goes wrong.
On a different note: with Phost 3.3c and later, Siliconoids
can have a different growth rate, like the Crystals, when
CrystalsPreferDeserts is on. This is not yet in stats.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=441396
I see that the climate of a planet is stored as
wPlanet = 100 - temperature
for some reason.
Part of the native growth formula is
sin(temp/100 * PI)
which is the same for say 25 and 100-25=75.
But instead of PI, a different value is used in Phost:
3.14159. That results in slightly different numbers. Stats
actually uses M_PI, which I don't see defined anywhere. Ah,
it is a C default at 3.14159265358979323846. That will also
give slightly different values.
Can someone confirm that the off-by-one errors are gone when
this new information is used? (I haven't changed any code.)
If not, please give an example of a calculation that goes wrong.
On a different note: with Phost 3.3c and later, Siliconoids
can have a different growth rate, like the Crystals, when
CrystalsPreferDeserts is on. This is not yet in stats.
Logged In: YES
user_id=670686
Fixed bug introduced with Borg assim change.
Code is now back to the functional level described her.