1
0
mirror of https://github.com/janet-lang/janet synced 2025-12-02 22:58:09 +00:00

Refactor opereduce in cfuns.c

This commit is contained in:
Calvin Rose
2018-07-02 19:53:35 -04:00
parent 5e2de33ae7
commit 17685bd789
3 changed files with 50 additions and 96 deletions

View File

@@ -137,18 +137,6 @@ int dst_##name(DstArgs args) {\
DST_DEFINE_MATH2OP(atan2, atan2)
DST_DEFINE_MATH2OP(pow, pow)
DST_DEFINE_MATH2OP(fmod, fmod)
int dst_modf(DstArgs args) {
double x, intpart;
Dst *tup;
DST_FIXARITY(args, 2);
DST_ARG_NUMBER(x, args, 0);
tup = dst_tuple_begin(2);
tup[0] = dst_wrap_real(modf(x, &intpart));
tup[1] = dst_wrap_real(intpart);
DST_RETURN_TUPLE(args, dst_tuple_end(tup));
}
/* Comparison */
#define DST_DEFINE_COMPARATOR(name, pred)\