Class IntExtensions.IterationInRange
Creates enumerator which enumerates all values contained in range defined by "wrappedStart" and "wrappedEnd". Wrap(Int32, Int32) These values enclosed in wrapping range [0, wrappedTo), so it may create situation where "wrappedStart" greater than "wrappedEnd" because of overlapping start or end bound.
I.e. for wrapping range [0, 100): [-50, 10) => [50, 10), [50, 120) => [50, 20)
In this case we have to iterate over two ranges: [wrappedStart, wrappedTo) and [0, wrappedEnd). If wrappedStart less or equal to wrappedEnd then we go to standard iteration over [wrappedStart, wrappedEnd).
Inheritance
System.Object
IntExtensions.IterationInRange
Namespace: Eco.Shared.Math
Assembly: Eco.Shared.dll
Syntax
public sealed class IterationInRange : ValueType
Constructors
IterationInRange(Int32, Int32, Int32)
Declaration
public IterationInRange(int wrappedStart, int wrappedEnd, int wrappedTo)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | wrappedStart | |
System.Int32 | wrappedEnd | |
System.Int32 | wrappedTo |
Methods
GetEnumerator()
Declaration
public IntExtensions.IterationInRange.Enumerator GetEnumerator()
Returns
Type | Description |
---|---|
IntExtensions.IterationInRange.Enumerator |