py: Fix typo printing complex numbers that are purely imaginary.

pull/390/head
Damien George 2014-03-29 11:41:38 +00:00
rodzic d1e443d0bc
commit 6e54fcfd12
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -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);