/// A seed source contains an <see cref="int"/> value which can be used as a seed for a <see cref="System.Random"/> or <see cref="SingleRandom"/>. Seed sources feature a convenient way to add multiple seeds using <see cref="Add(int)"/>, which will be sufficiently scrambled to be deterministically pseudorandom and combined into a single <see cref="int"/>.
/// This struct behaves similarly to <c>System.HashCode</c> in many ways, with an important distinction being that <see cref="SeedSource"/>'s scrambling procedure is not considered an implementation detail, and will stay consistent between process executions.
/// </summary>
/// <example>
/// For example, a seed source can be used to create a new <see cref="System.Random"/> based on an object's <c>x</c> and <c>y</c> coordinates by combining them into a <see cref="SeedSource"/> using <see cref="Add(int)"/>. The values generated by the <see cref="System.Random"/> created using <see cref="Random()"/> will then be determined by the specific pair of <c>x</c> and <c>y</c> values used.
/// </example>
publicreadonlystructSeedSource{
privatereadonlyint?value;
privateSeedSource(int?value){
this.value=value;
}
/// <summary>
/// Adds the given seed to this seed source's value and returns the result as a new seed source.
/// The algorithm used for adding involves various scrambling operations that sufficiently pseudo-randomize the seed and final value.
/// </summary>
/// <param name="seed">The seed to add.</param>
/// <returns>A new seed source with the seed added.</returns>
/// Adds the given seed to this seed source's value and returns the result as a new seed source.
/// Floating point values are scrambled by invoking <see cref="Add(int)"/> using a typecast version, followed by invoking <see cref="Add(int)"/> using the decimal value multiplied by <see cref="int.MaxValue"/>.
/// </summary>
/// <param name="seed">The seed to add.</param>
/// <returns>A new seed source with the seed added.</returns>