AGS_Maya (maths plugin) new version

Started by Kweepa, Thu 12/08/2004 06:07:25

Previous topic - Next topic

Kweepa

There's a new version of AGS_Maya available for download from the plugins page.
This includes some decent documentation and some bug fixes:
Go to the AGS home page, click on Downloads on the left, then scroll down and click on user written plugins.

BUGS FIXED:
ints_to_float() correctly handles negative numbers. Previously ints_to_float(-5,700) would be interpreted as -4.300. Now it is -5.700.
float_to_int() rounds to the nearest value. Previously (despite what I said on another thread) it would round to the nearest value if the number was positive, and just do something stupid if the number was negative. Maybe that was exacerbating your problem, Ghormak?

FUNCTIONS ADDED (see the docs for descriptions):

float_to_int_round_up()
float_to_int_round_down()
angle_from_degrees()
angle_from_radians()
degrees_from_angle()
radians_from_angle()

Steve
Still waiting for Purity of the Surf II

Ghormak

#1
Quote from: SteveMcCrea on Thu 12/08/2004 06:07:25float_to_int() rounds to the nearest value. Previously (despite what I said on another thread) it would round to the nearest value if the number was positive, and just do something stupid if the number was negative. Maybe that was exacerbating your problem, Ghormak?

Actually not, I was only overlooking something that now seems painfully obvious to me.
Every time I use float_to_int() it should be only with positive numbers, but I can imagine one or two occasions where negative ones will appear. This will be most useful! Thanks!

Edit:
On second thought, it probably WAS that negative number error that caused the engine to hang, but it's moot anyway because my script wouldn't have behaved like I wanted it to even if the plugin had been errorfree. :)
Achtung Franz! The comic

SMF spam blocked by CleanTalk