Search Results for

    Show / Hide Table of Contents

    Interface IMath<T>

    Defines the interface to a generic math helper

    Namespace:
    Assembly: .dll
    Syntax
    public interface IMath<T>
    Type Parameters
    Name Description
    T

    Methods

    add(T lhs, T rhs)

    Adds lhs + rhs

    Declaration
    public abstract T add(T lhs, T rhs)
    Parameters
    Type Name Description
    T lhs

    The first argument

    T rhs

    The second argument

    Returns
    Type Description
    T

    The result of addition

    compare(T lhs, T rhs)

    Compares lhs and rhs values

    Declaration
    public abstract int compare(T lhs, T rhs)
    Parameters
    Type Name Description
    T lhs

    The first argument

    T rhs

    The second argument

    Returns
    Type Description
    int

    a negative integer, zero, or a positive integer if lhs is less than, equal to, or greater than rhs.

    dec(T value)

    Decrements value by 1

    Declaration
    public abstract T dec(T value)
    Parameters
    Type Name Description
    T value

    The value to decrement

    Returns
    Type Description
    T

    The decremented value

    fromDouble(double value)

    Converts specified value from double equivalent

    Declaration
    public abstract T fromDouble(double value)
    Parameters
    Type Name Description
    double value

    The double equivalent

    Returns
    Type Description
    T

    The value

    getMaxValue()

    Gets the max value for T

    Declaration
    public abstract T getMaxValue()
    Returns
    Type Description
    T

    The max value

    getMinValue()

    Gets the min value for T

    Declaration
    public abstract T getMinValue()
    Returns
    Type Description
    T

    The min value

    getZeroValue()

    Gets zero value for T

    Declaration
    public abstract T getZeroValue()
    Returns
    Type Description
    T

    Zero value

    inc(T value)

    Increments value by 1

    Declaration
    public abstract T inc(T value)
    Parameters
    Type Name Description
    T value

    The value to increment

    Returns
    Type Description
    T

    The incremented value

    isNan(T value)

    Checks whether specified value is NaN value

    Declaration
    public abstract boolean isNan(T value)
    Parameters
    Type Name Description
    T value

    The value to check

    Returns
    Type Description
    boolean

    True if value is NaN

    max(T a, T b)

    Gets maximum value of a and b

    Declaration
    public abstract T max(T a, T b)
    Parameters
    Type Name Description
    T a

    The first value to compare

    T b

    The second value to compare

    Returns
    Type Description
    T

    The max value

    min(T a, T b)

    Gets minimum value of a and b

    Declaration
    public abstract T min(T a, T b)
    Parameters
    Type Name Description
    T a

    The first value to compare

    T b

    The second value to compare

    Returns
    Type Description
    T

    The min value

    mult(T lhs, double rhs)

    Multiplies lhs * rhs

    Declaration
    public abstract T mult(T lhs, double rhs)
    Parameters
    Type Name Description
    T lhs

    The first argument

    double rhs

    The second argument

    Returns
    Type Description
    T

    The result of multiplication

    mult(T lhs, int rhs)

    Multiplies lhs * rhs

    Declaration
    public abstract T mult(T lhs, int rhs)
    Parameters
    Type Name Description
    T lhs

    The first argument

    int rhs

    The second argument

    Returns
    Type Description
    T

    The result of multiplication

    subtract(T lhs, T rhs)

    Subtracts lhs - rhs

    Declaration
    public abstract T subtract(T lhs, T rhs)
    Parameters
    Type Name Description
    T lhs

    The first argument

    T rhs

    The second argument

    Returns
    Type Description
    T

    The result of subtraction

    toDouble(T value)

    Converts specified value to its double equivalent

    Declaration
    public abstract double toDouble(T value)
    Parameters
    Type Name Description
    T value

    The value to convert

    Returns
    Type Description
    double

    The double representation

    Back to top © 2011-2025 SciChart. All rights reserved. | sitemap.xml