// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Test current orientation through Euler conversion // Not compiled or tested in-world // Setup: Use a spare owned test object. Set arbitrary object rotations in Edit and touch. // Stop / restore: Disable/remove. Tests report privately and do not change visual prim properties. Any temporary timer stops at completion or timeout. // Notes: Euler angles are nonunique and may jump near singularities; the angular comparison tests orientation rather than identical angle text. // 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(); vector euler=llRot2Euler(original); rotation restored=llEuler2Rot(euler); float error=llAngleBetween(original,restored); llOwnerSay("Euler roundtrip pass="+(string)(error<0.001)+" angular error degrees="+(string)(error*RAD_TO_DEG)); } changed(integer flags) { if(flags&CHANGED_OWNER)llResetScript(); } }