Table of Contents

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

double

Avg(ReadOnlySpan<int>)

Returns the average sum of a span of int

public static double Avg(ReadOnlySpan<int> span)

Parameters

span ReadOnlySpan<int>

Returns

double

CeilDiv(int, int)

Divide two integers ceiling the result

public static int CeilDiv(int x, int y)

Parameters

x int
y int

Returns

int

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