Yeah, I've heard about that before. Its one of the caveats of Galaxy. Apparently when you do shift right logical.. It pads with 1's as well, so by default it makes the first bit a 1, and spits an error? (Not sure on this one)
Thanks for the hasty response :) will check it out.
edit: lolwut >_>
Vex is at a level beyond me. I've no idea whats going on there, but I made my own version. Just thought I'd share it here.
//Hexvaluesconststringc_Hex="0123456789abcdef";//Usedforcolorconversion//Hexcolortocolorcomponentinthc2c(strings){inti=StringFind(c_Hex,StringSub(s,1,1),false);intj=StringFind(c_Hex,StringSub(s,2,2),false);returnclampI((i-1)*16+(j-1),0,255);}colorGetHexColor(strings){intr=hc2c(StringSub(s,1,2));intg=hc2c(StringSub(s,3,4));intb=hc2c(StringSub(s,5,6));//Errorcheckif(StringLength(s)!=6){if(s!=""){//tDebug(xc("FF8888","Error: Invalid hex color @:\n"+s));}returnColor(255,255,255);}returnColor(r,g,b);}
I'm trying to come up with the most efficient algorithm to convert "ffffff" into 255,255,255, so i can call it with the color() function. I know how to do it the brute force way (Manually convert everything then do multiplication).. But i'm wondering if theres a better way to do it..
Any ideas?
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
@Kueken531: Go
Yeah, I've heard about that before. Its one of the caveats of Galaxy. Apparently when you do shift right logical.. It pads with 1's as well, so by default it makes the first bit a 1, and spits an error? (Not sure on this one)
@Kueken531: Go
Oh, they're just some custom functions of mine :P
@Kueken531: Go
Thanks for the hasty response :) will check it out.
edit: lolwut >_>
Vex is at a level beyond me. I've no idea whats going on there, but I made my own version. Just thought I'd share it here.
I'm trying to come up with the most efficient algorithm to convert "ffffff" into 255,255,255, so i can call it with the color() function. I know how to do it the brute force way (Manually convert everything then do multiplication).. But i'm wondering if theres a better way to do it..
Any ideas?