MathEx
public static class MathEx
int Ceiling(int x, int period)Summary: Ceilings the specified x.
Parameters:
x
- The x.
period
- The period.
Func<int, int> Ceiling(Func<int, int> f, int period)Summary: Ceilings the specified x.
Parameters:
x
- The x.
period
- The period.
Func<int, int> Compose(Func<int, int> f, Func<int, int> g)Summary: Composes the specified f.
Parameters:
f
- The f.
g
- The g.
int Floor(int x, int period)Summary: Floors the specified x.
Parameters:
x
- The x.
period
- The period.
Func<int, int> Floor(Func<int, int> f, int period)Summary: Floors the specified x.
Parameters:
x
- The x.
period
- The period.
IEnumerable<int> GetDivisorsLessThanOrEqual(int value, int max)Summary: Gets divisors for
value
that is less than or equal to the specifiedmax
value.Parameters:
value
- The value to get divisors of.
max
- The maximum divisor threshold.
int GreatestCommonDivisor(int v1, int v2)Summary: Find greatest common divisor.
Parameters:
v1
- The v1.
v2
- The v2.
double GreatestCommonDivisor(double v1, double v2)Summary: Find greatest common divisor.
Parameters:
v1
- The v1.
v2
- The v2.
int Hysteron(ref int state, int x, int width = 1, int height = 1)Summary: Associates the input with the result of an operator that takes the path of a loop, and its next state depends on its past state.
Parameters:
state
- Represents the state of the operator.
x
- Represents the input of the operator
width
- Represents the width of the loop
height
- Represents the height of the loop
Func<int, int> Modulate(Func<int, int> carrier, Func<int, int> cellFunction, int period)Summary: Modulates the specified carrier.
Parameters:
carrier
- The carrier.
cellFunction
- The cell function.
period
- The period.
Func<int, int> Multiply(Func<int, int> f, Func<int, int> g)Summary: Multiplies the specified f.
Parameters:
f
- The f.
g
- The g.
Func<int, int> Periodic(Func<int, int> f, int period)Summary: Periodics the specified f.
Parameters:
f
- The f.
period
- The period.
int Rect(int x, int width = 1, int height = 1)Summary: Rects the specified x.
Parameters:
x
- The x.
width
- The width.
height
- The height.
int SawTooth(int x, int period)Summary: Saws the tooth.
Parameters:
x
- The x.
period
- The period.
int Step(int x)Summary: Steps the specified x.
Parameters:
x
- The x.