isAllEqual

fun isAllEqual(array: DoubleArray, precision: Double = KSLMath.defaultNumericalPrecision): Boolean

Examines each element, a_i starting at 0, and determines if all the elements are equal a_0 = a_1 = a_2, etc.

Return

true if all elements are equal, if there are 0 elements then it returns false, 1 element returns true

Parameters

array

the array to check, must not be null

precision

the precision to consider things equal, defaults to KSLMath.defaultNumericalPrecision


Examines each element, a_i starting at 0, and determines if all the elements are equal a_0 = a_1 = a_2, etc.

Return

true if all elements are equal, if there are 0 elements then it returns false, 1 element returns true

Parameters

array

the array to check, must not be null