#changed it to Math.pow and stuff because
Explore tagged Tumblr posts
kafus · 1 year ago
Text
well that was a fun exercise.
i have this old function made for reading multiple bytes in an array as one big number, and not only is it a total mess, but it requires bytes to be passed in as strings in a 0x00 format, which is just... really weird, don't ask me how i landed on this months and months ago
Tumblr media
well now i have this instead
Tumblr media
instead of messing with converting strings and stuff, everything is numbers from the start, lol. and it can handle little endian if i want! the thing i'm actually using this for is big endian 99% of the time but still, why not. i feel like i learned a good bit doing that. that was fun
Tumblr media
whee!
7 notes · View notes