updated math functions

This commit is contained in:
hugogogo
2025-03-15 18:15:30 +01:00
parent 16a5bcd313
commit ec928d14b1
12 changed files with 200 additions and 66 deletions

View File

@@ -8,7 +8,7 @@ void int_to_hex_string(uint64_t value, char *out, uint8_t num_digits) { // nu
out[num_digits] = '\0';
}
void uint16_to_string(uint16_t value, char buffer[17]) {
void int_to_string(uint64_t value, char *buffer) {
// handle zero case
if (value == 0) {
buffer[0] = '0';
@@ -16,7 +16,7 @@ void uint16_to_string(uint16_t value, char buffer[17]) {
}
uint8_t size = -1;
uint16_t copy = value;
uint64_t copy = value;
while (copy) {
copy /= 10;
@@ -29,4 +29,4 @@ void uint16_to_string(uint16_t value, char buffer[17]) {
value /= 10;
size--;
}
}
}