13 lines
200 B
JavaScript
13 lines
200 B
JavaScript
|
export default function (array){
|
||
|
var out = {
|
||
|
x: array[0],
|
||
|
y: array[1]
|
||
|
};
|
||
|
if (array.length>2) {
|
||
|
out.z = array[2];
|
||
|
}
|
||
|
if (array.length>3) {
|
||
|
out.m = array[3];
|
||
|
}
|
||
|
return out;
|
||
|
}
|