Class SequencesMath
- Namespace
- Garyon.Mathematics
- Assembly
- Garyon.dll
Provides mathematical functions related to sequences of numbers.
public static class SequencesMath
- Inheritance
-
SequencesMath
- Inherited Members
Methods
Sum<T>(T)
Calculates the sum of all integers from 1 to max (inclusive).
public static T Sum<T>(T max) where T : IBinaryInteger<T>, IShiftOperators<T, int, T>
Parameters
maxT
Returns
- T
Type Parameters
T
Sum<T>(T, T)
Calculates the sum of all integers from
start to end (inclusive).
public static T Sum<T>(T start, T end) where T : IBinaryInteger<T>, IShiftOperators<T, int, T>
Parameters
startTendT
Returns
- T
Type Parameters
T