Thanks guys,
And another question... Does Aseba treat all int variables coming from a
target as signed 16bit? I tried using an unsigned however Aseba still
interpreted it as signed.
In the EPuckVariables code for the physical robot I tried using a uint16
instead of sint16.
Jonathan
On 13/12/10 8:37 PM, Philippe Rétornaz wrote:
Le lundi, 13 décembre 2010 09.45:44, Stéphane Magnenat a écrit :
On 13/12/10 05:09, Jonathan Mullins wrote:
Is there a way to generate a random number in Aseba Script? Or would
this have to be implemented as a native function?
Hi Jonathan,
You can implement a random-number generator in aseba script, for
instance using a linear congruential generator. The Aseba script
supports modulo, so this should be fairly straightforward. However, if
you want something more advanced, I would suggest to implement it in
native code.
I strongly suggest to implement it in native code since you need 32bits to
have a good enough random number.
This is on my todo list, but I don't know when I will have the time to do it
in a forseeable future.
Regards,
Philippe
_______________________________________________
Aseba-user mailing list
[email protected]
https://mail.gna.org/listinfo/aseba-user
_______________________________________________
Aseba-user mailing list
[email protected]
https://mail.gna.org/listinfo/aseba-user