Skip to content

Commit f9aafc5

Browse files
jmannaufloryst
authored andcommitted
docs: Add DataArray.getRanges documentation
1 parent ac8f207 commit f9aafc5

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Sources/Common/Core/DataArray/index.d.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,17 @@ export interface vtkDataArray extends vtkObject {
8484
setRange(rangeValue: vtkRange, componentIndex: number): Range;
8585

8686
/**
87+
* Returns an array of the ranges for each component of the DataArray.
88+
* Defaults to computing all the ranges if they aren't already computed.
8789
*
90+
* Passing `getRanges(false)` will return a clone of the ranges that have
91+
* already been computed. This is useful when you want to avoid recomputing
92+
* the ranges, which can be expensive.
93+
*
94+
* @param {boolean} [computeRanges] (default: true)
95+
* @returns {vtkRange[]}
8896
*/
89-
getRanges(): vtkRange[];
97+
getRanges(computeRanges = true): vtkRange[];
9098

9199
/**
92100
* Set the given tuple at the given index.

0 commit comments

Comments
 (0)