Replicated original myrand() logic; min/max should indeed be swapped if min is larger than max.
Merge pull request #3 from twostars/master

Replicated original myrand() logic; min/max should indeed be swapped if ...