// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Order exhibits by distance from a point // Not compiled or tested in-world // Setup: Use a spare owned prim. Set POINTS and CENTRE. Owner touch prints sample coordinates. // Stop / restore: Remove/disable. Nothing is rezzed or moved. // Notes: The strided sort key is consistently float; equal-distance ties may use implementation-dependent order. // License: see LICENSE in this distribution. // Original Incoprea. MIT. Planning only. list POINTS=[<4.0,0.0,0.0>,<1.0,1.0,0.0>,<2.0,3.0,0.0>]; vector CENTRE=ZERO_VECTOR; default { touch_start(integer detectedCount) { if(llDetectedKey(0)!=llGetOwner())return; list rows; integer i; for(i=0;i