【お知らせ】この部分は英語原文のみでの提供となります。何卒ご了承ください。
2.1.16.1.13 ran
Contents
Description
This function is essentially the same as the rnd() function
Syntax
double ran( int nSeed = 0 )
Parameters
- nSeed
- [input] (optional) pass positive value, returns 0; pass any nonzero negative value to set the seed for random number generation, or 0 to use the default seed.
Return
A uniformly random number between 0. and 1.
Examples
EX1
// The example displays 10 random numbers between 0. and 1. void ran_ex1() { for (int ii = 0; ii < 10; ii++) { double rr = ran(); out_double("value = ", rr); } }
Remark
See Also
Header to Include
origin.h