Class MathI
- Namespace
- Backdash
- Assembly
- Backdash.dll
Int Math
public static class MathI
- Inheritance
-
MathI
- Inherited Members
Methods
Avg(int[])
Returns the average sum of a span of int
public static double Avg(int[] values)
Parameters
values
int[]
Returns
Avg(ReadOnlySpan<int>)
Returns the average sum of a span of int
public static double Avg(ReadOnlySpan<int> span)
Parameters
span
ReadOnlySpan<int>
Returns
CeilDiv(int, int)
Divide two integers ceiling the result
public static int CeilDiv(int x, int y)
Parameters
Returns
SumRaw<T>(ReadOnlySpan<T>)
Returns the sum of a span of IBinaryInteger<TSelf>
public static T SumRaw<T>(ReadOnlySpan<T> span) where T : unmanaged, IBinaryInteger<T>, IAdditionOperators<T, T, T>
Parameters
span
ReadOnlySpan<T>
Returns
- T
Type Parameters
T
SumRaw<T>(T[])
Returns the sum of a span of IBinaryInteger<TSelf>
public static T SumRaw<T>(T[] values) where T : unmanaged, IBinaryInteger<T>, IAdditionOperators<T, T, T>
Parameters
values
T[]
Returns
- T
Type Parameters
T
Sum<T>(ReadOnlySpan<T>)
Returns the sum of a span of IBinaryInteger<TSelf>. Use SIMD if available.
public static T Sum<T>(ReadOnlySpan<T> span) where T : unmanaged, IBinaryInteger<T>, IAdditionOperators<T, T, T>
Parameters
span
ReadOnlySpan<T>
Returns
- T
Type Parameters
T
Sum<T>(T[])
Returns the sum of a span of IBinaryInteger<TSelf>. Use SIMD if available.
public static T Sum<T>(T[] values) where T : unmanaged, IBinaryInteger<T>, IAdditionOperators<T, T, T>
Parameters
values
T[]
Returns
- T
Type Parameters
T