【お知らせ】この部分は英語原文のみでの提供となります。何卒ご了承ください。
2.1.16.1.5 grnd
Contents
Description
normally distributed random number with mean=0 and sd=1, nSeed > 0 to set random seed (returns 0)
Syntax
double grnd( int nSeed = 0 )
Parameters
- nSeed
- (optional) pass any nonzero value to set the seed for random number generation, or 0 to use the current seed.
Return
A normally distributed random number.
Examples
EX1
// The example displays 10 normally distributes random numbers with mean=0 and // standard deviation = 1. void grnd_ex1() { for (int ii = 0; ii < 10; ii++) { double rr = grnd(); out_double("value = ", rr); } }
Remark
On every call it generates a normally distributed random double value with mean = 0. and
standard deviation = 1.
See Also
Header to Include
origin.h