• All submissions to this site are governed by Second Life Project Contribution Agreement. By submitting patches and other information using this site, you acknowledge that you have read, understood, and agreed to those terms.
MAINTENANCE ANNOUNCEMENT - JIRA will undergo maintenance starting 1:00am PDT through 3:00am on Saturday 2010.03.20. Please do not enter issues during this time as the system maybe restarted.
Issue Details (XML | Word | Printable)

Key: SVC-4865
Type: New Feature New Feature
Status: Open Open
Priority: Nice to have Nice to have
Assignee: Unassigned
Reporter: Clarknova Helvetic
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
2. Second Life Service - SVC

llRandN(float mean, float standard_devation)

Created: 28/Sep/09 06:46 PM   Updated: 30/Sep/09 02:47 AM
Component/s: Search
Affects Version/s: 1.23.0
Fix Version/s: None

Time Tracking:
Not Specified


 Description  « Hide
It would nice to have a RandN function as seen in MatLab and other languages. Unlinke llFrand(), a llRandN() or if you prefer llNrand(), would produce a random number with a given mean and a given standard deviation from that mean.

This would be very useful for generating numbers both above and below a given value with a given distribution. You can use a WHILE loop chained with IF comparisons to do the something similar, but this is inelegant and less precise. The judicious use of this function could make phenomena (e.g. particles) behave more like living things with less math overhead.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Tyche Shepherd added a comment - 30/Sep/09 02:47 AM
Whilst it may be nice to have a LSL library function for this it's a very trival bit of LSL coding to generate Gaussian random variables from uniform random numbers. The Box-Muller transformation function is one of several methods people can use to achieve this.