示例#1
0
        /// <summary>
        /// Gets the next value, based off of the <see cref="IVariableValue{T}.Min"/> and <see cref="IVariableValue{T}.Max"/>.
        /// </summary>
        /// <returns>The next value, based off of the <see cref="IVariableValue{T}.Min"/> and <see cref="IVariableValue{T}.Max"/>.</returns>
        public Color GetNext()
        {
            var a = (byte)RandomHelper.NextInt(_min.A, _max.A);
            var r = (byte)RandomHelper.NextInt(_min.R, _max.R);
            var g = (byte)RandomHelper.NextInt(_min.G, _max.G);
            var b = (byte)RandomHelper.NextInt(_min.B, _max.B);

            return(new Color(r, g, b, a));
        }
示例#2
0
        /// <summary>
        /// Gets the next value, based off of the <see cref="IVariableValue{T}.Min"/> and <see cref="IVariableValue{T}.Max"/>.
        /// </summary>
        /// <param name="value">The next value, based off of the
        /// <see cref="IVariableValue{T}.Min"/> and <see cref="IVariableValue{T}.Max"/>.</param>
        public void GetNext(ref Color value)
        {
            var a = (byte)RandomHelper.NextInt(_min.A, _max.A);
            var r = (byte)RandomHelper.NextInt(_min.R, _max.R);
            var g = (byte)RandomHelper.NextInt(_min.G, _max.G);
            var b = (byte)RandomHelper.NextInt(_min.B, _max.B);

            value = new Color(r, g, b, a);
        }
示例#3
0
 /// <summary>
 /// Gets the next value, based off of the <see cref="IVariableValue{T}.Min"/> and <see cref="IVariableValue{T}.Max"/>.
 /// </summary>
 /// <returns>The next value, based off of the <see cref="IVariableValue{T}.Min"/> and <see cref="IVariableValue{T}.Max"/>.</returns>
 public byte GetNext()
 {
     return((byte)RandomHelper.NextInt(Min, Max + 1));
 }
示例#4
0
 /// <summary>
 /// Gets the next value, based off of the <see cref="IVariableValue{T}.Min"/> and <see cref="IVariableValue{T}.Max"/>.
 /// </summary>
 /// <returns>The next value, based off of the <see cref="IVariableValue{T}.Min"/> and <see cref="IVariableValue{T}.Max"/>.</returns>
 public short GetNext()
 {
     return((short)RandomHelper.NextInt(Min, Max + 1));
 }
示例#5
0
 /// <summary>
 /// Gets the next value, based off of the <see cref="IVariableValue{T}.Min"/> and <see cref="IVariableValue{T}.Max"/>.
 /// </summary>
 /// <returns>The next value, based off of the <see cref="IVariableValue{T}.Min"/> and <see cref="IVariableValue{T}.Max"/>.</returns>
 public sbyte GetNext()
 {
     return((sbyte)RandomHelper.NextInt(Min, Max));
 }
示例#6
0
 /// <summary>
 /// Gets the next value, based off of the <see cref="IVariableValue{T}.Min"/> and <see cref="IVariableValue{T}.Max"/>.
 /// </summary>
 /// <returns>The next value, based off of the <see cref="IVariableValue{T}.Min"/> and <see cref="IVariableValue{T}.Max"/>.</returns>
 public int GetNext()
 {
     return(RandomHelper.NextInt(Min, Max + 1));
 }
示例#7
0
 /// <summary>
 /// Gets the next value, based off of the <see cref="IVariableValue{T}.Min"/> and <see cref="IVariableValue{T}.Max"/>.
 /// </summary>
 /// <returns>The next value, based off of the <see cref="IVariableValue{T}.Min"/> and <see cref="IVariableValue{T}.Max"/>.</returns>
 public ushort GetNext()
 {
     return((ushort)RandomHelper.NextInt(Min, Max));
 }