// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Test current orientation through axis-angle conversion // Not compiled or tested in-world // Setup: Use a spare owned test object. Rotate the object, 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: Near identity, the axis itself is not unique; identity is handled directly. // 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; rotation original=llGetRot(); float angle=llRot2Angle(original); rotation restored=ZERO_ROTATION; if(angle>0.000001)restored=llAxisAngle2Rot(llRot2Axis(original),angle); float error=llAngleBetween(original,restored); llOwnerSay("Axis-angle roundtrip pass="+(string)(error<0.001)+" error degrees="+(string)(error*RAD_TO_DEG)); } changed(integer flags) { if(flags&CHANGED_OWNER)llResetScript(); } }