Join us in Outworldz at www.outworldz.com:9000 or follow us:

Search dozens of selected web sites for OpenSim and LSL script

New! Script Meta-Search will search thousands of scripts here and at other sites for LSL or Opensim scripts.
Loading

Want to add a script or a project? Upload it and a half million people will see it and your name here this year.

Home   Show All
Category: Contributor: Creator
Vectors randVec  

randVec

Note that this is a function and will not work standalone.

Category: Vectors
By : Vince Bosen
Created: 2010-01-10 Edited: 2010-01-10
Worlds: Second Life

the Zip file

Download all files for randVec
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. randVec_1.lsl
1 vector randVec(float highBound){
2 integer xSign=llRound(llFrand(1));
3 integer ySign=llRound(llFrand(1));
4 integer zSign=llRound(llFrand(1));
5 float x = llFrand(highBound);
6 float y = llFrand(highBound);
7 float z = llFrand(highBound);
8 if(xSign)x=-x;
9 if(ySign)y=-y;
10 if(zSign)z=-z;
11 return <x,y,z>;
12 }

Back to the Best Free Tools in Second Life and OpenSim.