mirror of
https://github.com/micropython/micropython.git
synced 2026-01-05 11:40:18 +01:00
py: Implement divmod, % and proper // for floating point.
Tested and working on unix and pyboard.
This commit is contained in:
1
py/obj.h
1
py/obj.h
@@ -487,6 +487,7 @@ typedef struct _mp_obj_float_t {
|
||||
} mp_obj_float_t;
|
||||
mp_float_t mp_obj_float_get(mp_obj_t self_in);
|
||||
mp_obj_t mp_obj_float_binary_op(mp_uint_t op, mp_float_t lhs_val, mp_obj_t rhs); // can return MP_OBJ_NULL if op not supported
|
||||
void mp_obj_float_divmod(mp_float_t *x, mp_float_t *y);
|
||||
|
||||
// complex
|
||||
void mp_obj_complex_get(mp_obj_t self_in, mp_float_t *real, mp_float_t *imag);
|
||||
|
||||
Reference in New Issue
Block a user