summaryrefslogtreecommitdiffstatshomepage
path: root/py/objcomplex.c
diff options
context:
space:
mode:
authormux <freelancer.c@gmail.com>2014-01-27 10:21:42 +0200
committermux <freelancer.c@gmail.com>2014-01-27 10:21:42 +0200
commit00a4da93e8bb443b234b6a2cd7607d7abe2941e4 (patch)
treea8158753fa22545b12233b171a3b46c4e534ff9e /py/objcomplex.c
parentddf1aa9223a2786c64df07ea686ecfe6ee83d1b2 (diff)
downloadmicropython-00a4da93e8bb443b234b6a2cd7607d7abe2941e4.tar.gz
micropython-00a4da93e8bb443b234b6a2cd7607d7abe2941e4.zip
Fix implicit double conversion warning
Diffstat (limited to 'py/objcomplex.c')
-rw-r--r--py/objcomplex.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/py/objcomplex.c b/py/objcomplex.c
index af148a2786..24762e8b11 100644
--- a/py/objcomplex.c
+++ b/py/objcomplex.c
@@ -24,9 +24,9 @@ mp_obj_t mp_obj_new_complex(mp_float_t real, mp_float_t imag);
void complex_print(void (*print)(void *env, const char *fmt, ...), void *env, mp_obj_t o_in, mp_print_kind_t kind) {
mp_obj_complex_t *o = o_in;
if (o->real == 0) {
- print(env, "%.8gj", o->imag);
+ print(env, "%.8gj", (double) o->imag);
} else {
- print(env, "(%.8g+%.8gj)", o->real, o->imag);
+ print(env, "(%.8g+%.8gj)", (double) o->real, (double) o->imag);
}
}