resize Method
- If pointCount is less than current length, just reset current length to pointCount, effectively trimming active points but preserving original capacity.
- If pointCount is greater than current length, reallocate to exactly pointCount, copy existing points, and optionally pad excess with zero.
resize(pointCount: number, padWithZero?: boolean): void
Parameter | Type | Description |
---|---|---|
pointCount | number | new number of active points in array |
padWithZero | boolean | when increasing point count, whether to zero out new points (default false) |
Returns - void
Defined in
- geometry3d/GrowableXYArray.ts Line 116
Last Updated: 30 November, 2023