コード例 #1
0
 /// <summary>
 /// Seeds the PRNG with the provided seed.
 /// The initial value of *seedVal must be in the range 1 to 2147483646.
 /// If seed is negative or zero, the current date/time is used as a seed.
 /// </summary>
 /// <param name="seed">Any integer value between 1 to 2147483646</param>
 public Csound6Rand31(int seed)
 {
     m_seed = (seed & 0x7fffffff);
     if (m_seed == 0)
     {
         m_seed = (int)(Csound6Net.GetRandomSeedFromTime() & 0x7fffffff);             //keep random uint within range for int
     }
 }
コード例 #2
0
 /// <summary>
 ///
 /// </summary>
 public Csound6RandMT() :
     this((Int32)Csound6Net.GetRandomSeedFromTime())
 {
 }