Hi I want to sort an array of point objects in javascript so that the array,
[{x: 220, y: 1080}, {x: 1, y: 0}, {x: 0, y: 1080}]
becomes
[{x: 0, y: 1080}, {x: 1, y: 0}, {x: 220, y: 1080}]
Thanks in advance
Hi I want to sort an array of point objects in javascript so that the array,
[{x: 220, y: 1080}, {x: 1, y: 0}, {x: 0, y: 1080}]
becomes
[{x: 0, y: 1080}, {x: 1, y: 0}, {x: 220, y: 1080}]
Thanks in advance