Difference between revisions of "User:Bobbyb30 Zohari/snippets"

From Second Life Wiki
Jump to navigation Jump to search
(New page)
 
Line 1: Line 1:
These are some of the scripts(and snippets of code) that Bobbyb30 has either written, optimized, or utilized. If you use these snippets or scripts, please give credit where it is deserved.
These are some of the scripts(and snippets of code) that Bobbyb30 has either written, optimized, or utilized. If you use these snippets or scripts, please give credit where it is deserved.
<lsl>
//Bobbyb30 Zohari (C) 2008
//March 25, 2008
//RGB Hex Converter
//----
//Convert Hex to RGB format
//Can also be used for decompression of vectors in Hex format
vector hex2rgb(integer hex)
{
float x = (rgba >> 16) & 0xFF;
float y = (rgba >> 8) & 0xFF;
float z = rgba & 0xFF;
return <x,y,z>;
}
</lsl>

Revision as of 14:57, 25 March 2008

These are some of the scripts(and snippets of code) that Bobbyb30 has either written, optimized, or utilized. If you use these snippets or scripts, please give credit where it is deserved.

<lsl> //Bobbyb30 Zohari (C) 2008 //March 25, 2008 //RGB Hex Converter //---- //Convert Hex to RGB format //Can also be used for decompression of vectors in Hex format

vector hex2rgb(integer hex) { float x = (rgba >> 16) & 0xFF; float y = (rgba >> 8) & 0xFF; float z = rgba & 0xFF; return <x,y,z>; } </lsl>