As far as I'm aware it doesn't exist in blitz however...
x = ((Rand(0,1) * 2) - 1) * 3
explained...
(0 or 1) * 2 = (0 or 2) - 1 = (-1 or 1) * 3 = (-3 or 3)
That said... I'm not sure if it's going to be faster to just do
if rand(0,1) then x=3 else x=-3
x = ((Rand(0,1) * 2) - 1) * 3
explained...
(0 or 1) * 2 = (0 or 2) - 1 = (-1 or 1) * 3 = (-3 or 3)
That said... I'm not sure if it's going to be faster to just do
if rand(0,1) then x=3 else x=-3