User:Draconis Neurocam

From Second Life Wiki
Revision as of 04:26, 24 December 2010 by Draconis Neurocam (talk | contribs)
Jump to navigation Jump to search

Salutations, I am Draconis Neurocam.

My goal is to make things better to the best of my ability.

This place is something I dreamed would exist as a child, and now since it does, I love being a part of it.

What most people never actually realize is how powerful what we have at our fingertips is.

I take this as an extension of real life, and not something separate.


@Neurocam_ <lsl> //Written by Nomad Padar one of the most genius people I have ever known vector int2vec(integer n) {

   //0zyx ZZZZ ZZZZ ZZZZ YYYY YYYY XXXX XXXX
   return <n&0xFF, (n>>8)&0xFF, ((n>>16)&0xFF)> + <((n&0x10000000)!=0)*.5,((n&0x20000000)!=0)*.5,((n&0x40000000)!=0)*.5>;

} integer vec2int(vector v) {

   integer x = (integer)(v.x);
   integer y = (integer)(v.y);
   integer z = (integer)(v.z);
   integer out;
   
   //Rounds to 0, .5, or 1.0
   float delta = v.x-x;
   if((delta>.25) && (delta<.75)) out += 0x10000000;
   else if(delta>.75) out += 0x1;
   delta = v.y-y;
   if((delta>.25) && (delta<.75)) out += 0x20000000;
   else if(delta>.75) out += 0x100;
   delta = v.z-z;
   if((delta>.25) && (delta<.75)) out += 0x40000000;
   else if(delta>.75) out += 0x10000;
   out += x+(y<<8)+(z<<16);
   return out;

} default {

   touch_start(integer total_number)
   {
       integer param = vec2int(llGetPos());
       llSay(0, (string)param);
       llSay(0, (string)int2vec(param));
   }

}

</lsl>