HamBook – Blame information for rev 54
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
54 | office | 1 | using System.Collections.Generic; |
2 | using System.Linq; |
||
3 | |||
4 | namespace HamBook.Utilities |
||
5 | { |
||
6 | public static class Mathematics |
||
7 | { |
||
8 | public static IEnumerable<int> GenerateRange(int min, int max, int step = 1) |
||
9 | { |
||
10 | foreach (var value in Enumerable.Range(min, max - min + 1).Where(i => (i - 0) % step == 0)) |
||
11 | yield return value; |
||
12 | } |
||
13 | } |
||
14 | } |