Пример #1
0
 /// <summary>
 /// Checks if the specified random engine has the same state as this one.
 /// </summary>
 /// <param name="other">The other random engine whose state is to be compared.</param>
 /// <returns>Returns true if the other random engine is not null and both random engines have the same state, false otherwise.</returns>
 /// <remarks>Since Unity's random engine is a static global, all instances of the <see cref="UnityRandom"/> wrapper reference
 /// the same underlying state and are therefore always equal.</remarks>
 public bool Equals(UnityRandom other)
 {
     return(other != null);
 }
Пример #2
0
 /// <summary>
 /// Copies the state of the <paramref name="source"/> Unity Random engine into this engine, so that this engine will independently generate the same sequence of random values as the source.
 /// </summary>
 /// <param name="source"></param>
 /// <remarks>The source engine is not altered.</remarks>
 public void CopyStateFrom(UnityRandom source)
 {
     // Since Unity uses a shared global instance, this function is a no-op.
     // Maintained for consistency with other random engine classes.
 }