QPoint2dBuffer.getQPoint Function

Extracts the point at the specified index from a buffer.

getQPoint(points: Uint16Array, pointIndex: number, result?: QPoint2d): QPoint2d

@returns The point at pointIndex.

@throws Error if pointIndex is out of bounds.

Parameter Type Description
points Uint16Array The buffer in which each consecutive pair of integers is a 2d quantized point.
pointIndex number The index of the point to extract, ranging from zero to one less than the number of points in the buffer.
result QPoint2d If supplied, a preallocated QPoint2d to initialize with the result and return.

Returns - QPoint2d

The point at pointIndex.

Defined in

Last Updated: 14 November, 2024