API Reference > geometry-core > ArraysAndInterfaces > IndexedXYCollection > vectorXAndYIndex vectorXAndYIndex MethodAbstract Return a vector from given origin to the point at indexB vectorXAndYIndex(origin: Readonly<WritableXAndY>, indexB: number, result?: Vector2d): undefined | Vector2d Parameter Type Description origin Readonly<WritableXAndY> origin for vector indexB number index of point within the array result Vector2d optional caller-allocated vector. Returns - undefined | Vector2d undefined if index is out of bounds Defined in geometry3d/IndexedXYCollection.ts Line 54 Last Updated: 11 June, 2024