Bots and Simulations > DNA - General
Rounding
abyaly:
is the rounding performed when you store a value, or are all numbers on the stack integers?
Numsgil:
All numbers on the stack are integers, but have more bits than the robot memory. So you shouldn't have to worry about overflow.
5 3 div would result in 1 I believe (though definitely double check that).
abyaly:
doing trig this way will be interesting
Numsgil:
When I first joined I was able to make an approximating function that took bot angles and found the sine of them (expressed in -1000 to 1000 I think).
Another alternative is to just use vectors and use the dot and cross products for sine and cosine where you need them.
abyaly:
I'm trying to convert velocity vectors from the bot's frame of reference into the standard basis. (or convert position -into- the bot's frame of reference; it amounts to the same thing)
Navigation
[0] Message Index
[#] Next page
Go to full version