Api
PointTocoordinateobjects
OpenAPI > Point > toCoordinateObjects
OpenAPI.Point.toCoordinateObjects() method
数值坐标数组转对象坐标数组
Signature:
static toCoordinateObjects(arr: number[]): {
x: number;
y: number;
}[];
Parameters
Parameter | Type | Description |
---|---|---|
arr | number[] | 数值坐标数组 |
{ x: number; y: number; }[]
Example
const arr = [1, 2, 3, 4, 5, 6]
const result = OpenAPI.Point.toCoordinateObjects(arr) // 返回对象坐标数组