Last active
June 20, 2016 03:27
-
-
Save msly/c69063162d17c6872546b6962a99b534 to your computer and use it in GitHub Desktop.
生成类似java的随机数
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 0.8822016520425677 | |
| std::string _create_random() | |
| { | |
| static default_random_engine random; | |
| uniform_real_distribution<double> dis(0.0, 1.0); | |
| uniform_int_distribution<int> dis2(100000000, 999999999); | |
| return fmt::format("{}{}", dis(random), dis2(random)); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment