1
This commit is contained in:
@@ -7,6 +7,17 @@ namespace BITKit
|
||||
{
|
||||
public static class MathE
|
||||
{
|
||||
public static int GetHash<T>(IEnumerable<T> self)
|
||||
{
|
||||
var hash = 0;
|
||||
foreach (var x in self)
|
||||
{
|
||||
if (x is not null)
|
||||
hash += x.GetHashCode();
|
||||
}
|
||||
|
||||
return hash;
|
||||
}
|
||||
public static bool IndexInRange<T>(this IEnumerable<T> self, int index)
|
||||
{
|
||||
return index >= 0 && index < self.Count();
|
||||
|
Reference in New Issue
Block a user