// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Test local-to-world orientation consistency // Not compiled or tested in-world // Setup: Use a spare owned test object. Put inside a rezzed linked child, then touch. // Stop / restore: Disable/remove. Tests report privately and do not change visual prim properties. Any temporary timer stops at completion or timeout. // Notes: Uses the minimum angular difference; tolerances account for float conversion. // License: see LICENSE in this distribution. // Original Incoprea. MIT. Runtime verification, not pre-certified behavior. default { touch_start(integer detectedCount) { if(llDetectedKey(0)!=llGetOwner())return; if(llGetAttached()!=0||llGetLinkNumber()<2) { llOwnerSay("Use a rezzed child prim."); return; } rotation predicted=llGetLocalRot()*llGetRootRotation(); float error=llAngleBetween(predicted,llGetRot()); llOwnerSay("Orientation reconstruction pass="+(string)(error<0.001)+" error degrees="+(string)(error*RAD_TO_DEG)); } changed(integer flags) { if(flags&CHANGED_OWNER)llResetScript(); } }