Name: Anonymous 2012-01-19 12:22
Fellow Progs,
any idea to nicely implement this ?
First idea...ugly
get random value
if value is zero
get random value
done
Second idea
get random positive value
make coin toss
if coin shows head
value *= -1
But there must be something easiert / nicer
thanks alot.
any idea to nicely implement this ?
First idea...ugly
get random value
if value is zero
get random value
done
Second idea
get random positive value
make coin toss
if coin shows head
value *= -1
But there must be something easiert / nicer
thanks alot.