Show / Hide Table of Contents

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

Extension Methods

CommandLine.FeedFromCommandLine(Object)
CommandLine.ToCommandLineArgs(Object, Func<Object, Boolean>)
ListUtil.DepthFirstTraversal<T>(T, Func<T, IEnumerable<T>>)
EnumerableExtensions.SingleItemAsEnumerable<T>(T)
EventUtils.RaiseEvent<TEventArgs>(Object, String, TEventArgs)
PredicateUtils.MatchesAll<TEnumerable, T>(T, TEnumerable)
PredicateUtils.MatchesAll<T>(T, Func<T, Boolean>[])
PredicateUtils.MatchesAny<TEnumerable, T>(T, TEnumerable)
ReflectionUtils.PropertyValue<T>(Object, PropertyInfo)
ReflectionUtils.TryGetPropertyValueByName<T>(Object, String, out T)
ReflectionUtils.GetPropertyValueByName<T>(Object, String)
ReflectionUtils.SetPropertyByName(Object, String, Object)
ReflectionUtils.GetStructPropertyByName<T>(Object, String)
ReflectionUtils.GetStringPropertyByName(Object, String)
ReflectionUtils.ZipByProperty<T>(Object, Object, Object, Func<T, T, T>)
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾