Tigairius |
05-13-2008 09:13 PM |
Sorry for late post, but I was looking at your convertToHex function:
PHP Code:
HEX = {{10, "A"}, {11, "B"}, {12, "C"}, {13, "D"}, {14, "E"}, {15, "F"}}; function convertToHex(nr) { for (i = 0; i < HEX.size(); i++) { if (HEX[i][0] == nr) { return HEX[i][1]; } } return nr; }
and I noticed you could just as easily have done this:
PHP Code:
function convertToHex(nr) { temp.hextable = "0123456789ABCDEF"; return hextable.charat(nr % 16); }
Just for future reference, it's quite a lot more efficient to do it that way, I'd say.
|