Just a quick bit of help needed for a big project I'm working on. Does anybody know about making a random number that is either '1' or '-1'? I ask because if I just do it in a range like usual, that will also include '0'. I want to randomly make either a '1' or '-1'. Any help would be much appreciated!
-1*-1 = 1
-1*-1*-1 = -1
...
its horribly inefficient even with the % 100 ... its the snarky answer, really, like swapping 2 numbers with xor. Pow doesn't do it with multiplies so the % 100 isn't doing anything except capping rand to a percentage or something easy to observe. Pow runs the series, but its enabled for floating point exponents so it does a bunch of pointless work to come up with the answer.