// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Live logarithmic range slider // Not compiled or tested in-world // Setup: Use a spare ordinary cube owned by you. Set positive MINIMUM and MAXIMUM greater than MINIMUM. Surface mapping can differ on meshes; test one face first. // Stop / restore: Disable/remove; these controllers report privately and do not alter scene properties. Reset clears gesture/session state. // Notes: A midpoint selects the geometric mean; invalid configuration is reported before calculating. // License: see LICENSE in this distribution. // Original Incoprea. MIT. Owner input only. float MINIMUM=0.01; float MAXIMUM=100.0; float nextReport; report() { vector uv=llDetectedTouchST(0); if(!usable(uv))return; if(MINIMUM<=0.0||MAXIMUM<=MINIMUM) { llOwnerSay("Require01.0)t=1.0; llOwnerSay("Log value="+(string)(MINIMUM*llPow(MAXIMUM/MINIMUM,t))); } integer ownerTouch() { return llDetectedKey(0)==llGetOwner(); } integer usable(vector uv) { return llDetectedTouchFace(0)>=0&&uv!=TOUCH_INVALID_TEXCOORD; } default { touch_start(integer n) { if(ownerTouch()) { report(); nextReport=llGetTime()+0.25; } } touch(integer n) { if(ownerTouch()&&llGetTime()>=nextReport) { nextReport=llGetTime()+0.25; report(); } } changed(integer flags) { if(flags&CHANGED_OWNER)llResetScript(); } }