// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Size a display by viewing angle // Not compiled or tested in-world // Setup: Put in a spare owned prim. Set viewing distance positive and angle between0 and170 degrees. Touch to print the plan privately. // Stop / restore: Remove/disable; calculations do not alter objects. // Notes: Assumes centered perpendicular viewing. This is geometric planning, not a viewer camera adjustment. // License: see LICENSE in this distribution. // Original Incoprea. MIT. Calculation only. float DISTANCE=6.0; float ANGLE=45.0; default { touch_start(integer detectedCount) { if(llDetectedKey(0)!=llGetOwner())return; if(DISTANCE<=0.0||ANGLE<=0.0||ANGLE>=170.0) { llOwnerSay("Invalid distance/angle."); return; } llOwnerSay("Display width="+(string)(2.0*DISTANCE*llTan(ANGLE*DEG_TO_RAD*0.5))); } }