General information
Category:
Coding, syntax and commands
>>I've used the example from help on how to generate random numbers. Now I need a random number between -1 and 1 (integer -1,0,1) and cannot figure out how to modify the example to give negative and positive numbers. Any tips?
>You are not showing any example of what you are trying to do. There is only one integer between -1 and 1 though and that is the zero. What does the example code look like?
I believe he meant random integer between -1 and 1 *inclusive* (i.e. including -1 and 1)
... and on a random tangent... Have you ever seen a prompt that reads "Press a key between 1 and 0"? Initially it sounds like it is oddly phrased, but you realize what it means after you look down at the keyboard (at the numeric keys above the alphabet keys). Custom keycaps are handy -- especially one that reads "Any".
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only