Generating Negative and Positive Numbers
Hello,
I'm trying to generate random numbers between -63 and 63, but can't work out how to adapt previous patches that have been submitted to the forum. Also, would it be possible to adapt the equation for variable arguments?
Thank you
hello.
something like that ?

Hello,
Perfect.
Thank you very much
you're welcome =)
2000 > 110
:(
[expr random(-63,63)]
;D
Hello,
Thanks, also.
Hi Schlam,
Thanks a lot for the patch yesterday. It works great, but at the risk of sounding stupid, could I ask a question about its operation, please. I understand the addition of +1 to create the correct number for random, but why is the range 128? Is it because -63 becomes the equivalent of 0?
Thank you
hello,
with 128, [random] will output randomned values from 0 to 127
with the [- 63] after, it will output from -63 to 64.
yes, for your request, random "127" would be more appropriate and will really output from -63 to 63
Hello,
Great. Thanks for clarifying.
the principle of "offset".
if you need to need to do something which only works in a certain number range, do e.g. +64, process, -64
Hello,
OK, thanks. I think I understand what you mean, but would it be possible to illustrate with a basic example using a couple of objects, just so I'm sure.
Thank you