iOS & macOS Charting Documentation - SciChart iOS & macOS Charts SDK v4.x

ISCIMath

@protocol ISCIMath <NSObject>

Defines the interface to a generic math helper.

  • Gets the min value.

    Declaration

    Objective-C

    @property (nonatomic, readonly) id<ISCIComparable> _Nonnull minValue;
  • Gets the max value.

    Declaration

    Objective-C

    @property (nonatomic, readonly) id<ISCIComparable> _Nonnull maxValue;
  • Gets zero value.

    Declaration

    Objective-C

    @property (nonatomic, readonly) id<ISCIComparable> _Nonnull zeroValue;
  • Gets maximum value of a and b.

    Declaration

    Objective-C

    - (nonnull id<ISCIComparable>)max:(nonnull id<ISCIComparable>)a
                                  and:(nonnull id<ISCIComparable>)b;

    Parameters

    a

    The first value to compare.

    b

    The second value to compare.

    Return Value

    The max value.

  • Gets minimum value of a and b.

    Declaration

    Objective-C

    - (nonnull id<ISCIComparable>)min:(nonnull id<ISCIComparable>)a
                                  and:(nonnull id<ISCIComparable>)b;

    Parameters

    a

    The first value to compare.

    b

    The second value to compare.

    Return Value

    The min value.

  • Checks whether specified value is NaN value.

    Declaration

    Objective-C

    - (BOOL)isNan:(nonnull id<ISCIComparable>)value;

    Parameters

    value

    The value to check.

    Return Value

    True if value is NaN.

  • Checks whether specified value is zero value.

    Declaration

    Objective-C

    - (BOOL)isZeroValue:(nonnull id<ISCIComparable>)value;

    Parameters

    value

    The value to check.

    Return Value

    YES if value is zero in current math, otherwise - NO.

  • Converts specified value to it’s double equivalent.

    Declaration

    Objective-C

    - (double)toDouble:(nonnull id<ISCIComparable>)value;

    Parameters

    value

    The value to convert.

    Return Value

    The double representation.

  • Converts specified value from it’s double equivalent.

    Declaration

    Objective-C

    - (nonnull id<ISCIComparable>)fromDouble:(double)value;

    Parameters

    value

    The double equivalent.

    Return Value

    The value.

  • Multiplies lhs * rhs.

    Declaration

    Objective-C

    - (nonnull id<ISCIComparable>)mult:(nonnull id<ISCIComparable>)lhs
                              byDouble:(double)rhs;

    Parameters

    lhs

    The first argument.

    rhs

    The second argument.

    Return Value

    The result of multiplication.

  • Multiplies lhs * rhs.

    Declaration

    Objective-C

    - (nonnull id<ISCIComparable>)mult:(nonnull id<ISCIComparable>)lhs
                                 byInt:(int)rhs;

    Parameters

    lhs

    The first argument.

    rhs

    The second argument.

    Return Value

    The result of multiplication.

  • Adds lhs + rhs.

    Declaration

    Objective-C

    - (nonnull id<ISCIComparable>)add:(nonnull id<ISCIComparable>)lhs
                                   to:(nonnull id<ISCIComparable>)rhs;

    Parameters

    lhs

    The first argument.

    rhs

    The second argument.

    Return Value

    The result of addition.

  • Subtracts lhs - rhs.

    Declaration

    Objective-C

    - (nonnull id<ISCIComparable>)subtract:(nonnull id<ISCIComparable>)rhs
                                      from:(nonnull id<ISCIComparable>)lhs;

    Parameters

    rhs

    The second argument.

    lhs

    The first argument.

    Return Value

    The result of subtraction.

  • Increments value by 1.

    Declaration

    Objective-C

    - (nonnull id<ISCIComparable>)inc:(nonnull id<ISCIComparable>)value;

    Parameters

    value

    The value to increment.

    Return Value

    The incremented value.

  • Decrements value by 1.

    Declaration

    Objective-C

    - (nonnull id<ISCIComparable>)dec:(nonnull id<ISCIComparable>)value;

    Parameters

    value

    The value to decrement.

    Return Value

    The decremented value.

  • Compares lhs and rhs values.

    Declaration

    Objective-C

    - (NSComparisonResult)compare:(nonnull id<ISCIComparable>)lhs
                               to:(nonnull id<ISCIComparable>)rhs;

    Parameters

    lhs

    The first argument.

    rhs

    The second argument.

    Return Value

    NSOrderedAscending, NSOrderedSame, or NSOrderedDescending if lhs is less than, equal to, or greater than rhs.