IMath
StockSharp.Xaml.Charting.Numerics.GenericMath
Defines the interface to a generic math helper
Properties
MinValue
public T MinValue { get; }
value = iMath.MinValue
Gets the MinValue for T. for DateTime it returns DateTime.MinValue (it has .Ticks = 0)
ZeroValue
public T ZeroValue { get; }
value = iMath.ZeroValue
Gets the ZeroValue for T. for DateTime it returns DateTime.MinValue (it has .Ticks = 0)
Methods
Add
public T Add(T lhs, T rhs)
result = iMath.Add(lhs, rhs)
Adds lhs + rhs. for DateTime it returns a new DateTime with .Ticks = lhs.Ticks + rhs.Ticks
IsNaN
public bool IsNaN(T value)
result = iMath.IsNaN(value)
Returns if T is NaN. Only valid for Float, Double types. For all other types, always returns false
MinGreaterThan
public T MinGreaterThan(T floor, T a, T b)
result = iMath.MinGreaterThan(floor, a, b)
Returns the Min of A and B greater than a Floor
Subtract
public T Subtract(T a, T b)
result = iMath.Subtract(a, b)
Subtracts a - b. For DateTime it returns a new DateTime with .Ticks = a.Ticks - b.Ticks
ToDouble
public double ToDouble(T value)
result = iMath.ToDouble(value)
Converts to the equivalent value as a double