// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Interpolate across the heading seam // Not compiled or tested in-world // Setup: Put in a spare prim you own. Edit FROM_DEGREES and TO_DEGREES, then touch to see five samples. // Stop / restore: Disable or remove the script. It only reports to its owner and does not change prim properties. Reset clears its temporary state. // Notes: The exact 180-degree tie chooses the negative turn. This handles scalar headings; full 3D orientation needs quaternion methods. // License: see LICENSE in this distribution. // Original Incoprea example. MIT. Owner-only calculation; no scene changes. float FROM_DEGREES = 350.0; float TO_DEGREES = 10.0; float wrap(float angle) { return angle-360.0*llFloor(angle/360.0); } float shortDelta(float a, float b) { return wrap(b-a+180.0)-180.0; } default { touch_start(integer detectedCount) { if (llDetectedKey(0) != llGetOwner()) return; float delta=shortDelta(FROM_DEGREES,TO_DEGREES); integer i; for (i=0; i<=4; ++i) llOwnerSay((string)wrap(FROM_DEGREES+delta*(float)i/4.0)); } changed(integer change) { if (change & CHANGED_OWNER) llResetScript(); } }