Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006110opensim[REGION] Script Functionspublic2012-07-27 09:532012-07-27 23:11
ReporterSignpostMarv 
Assigned Tojustincc 
PrioritynormalSeverityminorReproducibilityN/A
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Versionmaster (dev code) 
Target VersionFixed in Version 
Summary0006110: LSL/OSSL lacks Math.Min & Math.Max implementations.
DescriptionThere's no built-in implementations of Math.Min/Math.max in LSL (see http://wiki.secondlife.com/wiki/Min [^] for user-defined function implementation).

Peppering scripts with user-defined functions for trivial things like Math functions seems a little counter-productive, so here's a patch.
Steps To Reproducedefault
{
    state_entry()
    {
        llOwnerSay(llList2CSV([
            "\n",
            osMin(0, 1), // should be 0.0
            osMin(1, 0), // should be 0.0
            osMin(0.0, 1.0), // should be 0.0
            osMin(1.0, 0.0), // should be 0.0
            "\n",
            osMax(0, 1), // should be 1.0
            osMax(1, 0), // should be 1.0
            osMax(0.0, 1.0), // should be 1.0
            osMax(1.0, 0.0), // should be 1.0
            "\n",
            osMax(0, osMin(1, 0.5)), // should be 0.5
            osMax(0, osMin(1, -0.5)), // should be 0.0
            osMax(0, osMin(1, 1.5)) // should be 1.0
        ]));
    }
}
TagsNo tags attached.
Git Revision or version number6ee17f5b36
Run ModeStandalone (1 Region)
Physics EngineBasicPhysics
Environment.NET / Windows32
Mono VersionNone
Viewer
Attached Filespatch file icon min-max.patch [^] (3,567 bytes) 2012-07-27 09:53 [Show Content]

- Relationships

-  Notes
(0021924)
justincc (administrator)
2012-07-27 23:11

Applied as git master 72d29bd. Thanks SignpostMarv.

- Issue History
Date Modified Username Field Change
2012-07-27 09:53 SignpostMarv New Issue
2012-07-27 09:53 SignpostMarv File Added: min-max.patch
2012-07-27 09:54 SignpostMarv Status new => patch included
2012-07-27 23:11 justincc Note Added: 0021924
2012-07-27 23:11 justincc Status patch included => resolved
2012-07-27 23:11 justincc Resolution open => fixed
2012-07-27 23:11 justincc Assigned To => justincc


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker