mirror of
https://github.com/micropython/micropython.git
synced 2026-01-07 12:40:15 +01:00
py: Fix typo printing complex numbers that are purely imaginary.
This commit is contained in:
@@ -30,7 +30,7 @@ STATIC void complex_print(void (*print)(void *env, const char *fmt, ...), void *
|
||||
char buf[32];
|
||||
if (o->real == 0) {
|
||||
format_float(o->imag, buf, sizeof(buf), 'g', 6, '\0');
|
||||
print(env, "%s", buf);
|
||||
print(env, "%sj", buf);
|
||||
} else {
|
||||
format_float(o->real, buf, sizeof(buf), 'g', 6, '\0');
|
||||
print(env, "(%s+", buf);
|
||||
|
||||
Reference in New Issue
Block a user