Make randomSwitch use Double instead of Int, close #1495
Merge pull request #1509 from notdryft/randomSwitch

Make randomSwitch use Double instead of Int, close #1495