Native Function Library Documentation > Native Function Library BPLibrary > Sort Vectors by Distance

Sort Vectors by Distance

Sorts an array of vectors relative to distance to the provided location vector from closest to furthest.

Inputs

In
Exec

Relative To
Vector

Location to sort against

Array
Array of Vectors

Array to sort

Outputs

Out
Exec

Return Value
Array of Vectors

Sorted Array from closest to furthest