NumberArray Class
The NumberArray
class contains static methods that act on arrays of numbers.
Methods
Name | Description | |
---|---|---|
constructor(): NumberArray | ||
cloneWithStartAndEndMultiplicity(knots: undefined | number[], target0: number, target1: number): number[] Static | Return a copy of the knots array, with multiplicity of first and last knots raised or lowered to expectedMultiplicity. | |
create(source: number[] | Float64Array): number[] Static | copy numbers from variant sources to number[]. | |
createArrayWithMaxStepSize(low: number, high: number, step: number): number[] Static | Return an array with indicated start and end points, maximum step size internally | |
isAlmostEqual(dataA: undefined | number[] | Float64Array, dataB: undefined | number[] | Float64Array, tolerance: number): boolean Static | Return true if arrays have identical counts and entries equal within tolerance | |
isCoordinateInArray(x: number, data: undefined | number[]): boolean Static | test if coordinate x appears (to tolerance by Geometry.isSameCoordinate ) in this array of numbers |
|
isExactEqual(dataA: undefined | any[] | Float64Array, dataB: undefined | any[] | Float64Array): boolean Static | Return true if arrays have identical counts and equal entries (using !== comparison) |
|
linearCombination(data: number[], scales: number[]): number Static | Compute the linear combination s of the numbers and scales. | |
linearCombinationOfColors(colors: number[], scales: number[]): number Static | Compute the linear combination s of the colors and scales. | |
maxAbsArray(values: number[]): number Static | Return the max absolute value in a array of numbers. | |
maxAbsDiff(dataA: number[] | Float64Array, dataB: number[] | Float64Array): number Static | Return the max absolute difference between corresponding entries in two arrays of numbers | |
maxAbsDiffFloat64(dataA: Float64Array, dataB: Float64Array): number Static | Return the max absolute difference between corresponding entries in two Float64Array | |
maxAbsTwo(a1: number, a2: number): number Static | return the max absolute value of a pair of numbers | |
preciseSum(data: number[]): number Static | return the sum of values in an array, The summation is done with correction terms which | |
sum(data: number[] | Float64Array): number Static | return the sum of numbers in an array. |
Defined in
- geometry3d/PointHelpers.ts Line 42
Last Updated: 20 June, 2023