Join us in Outworldz at or follow us:

[Table of Contents]

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  


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.