Skip to content

Commit a55673f

Browse files
committed
CHANGE: moved AS_DECIMAL define
used to receive decimal value, when argument may be decimal or integer
1 parent b415fe5 commit a55673f

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/core/n-math.c

-2
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ const double pi2 = 2.0 * 3.14159265358979323846;
4444
#define DBL_EPSILON 2.2204460492503131E-16
4545
#endif
4646

47-
#define AS_DECIMAL(n) (IS_INTEGER(n) ? (REBDEC)VAL_INT64(n) : VAL_DECIMAL(n))
48-
4947
enum {SINE, COSINE, TANGENT};
5048

5149

src/include/sys-value.h

+1
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ typedef struct Reb_Type {
155155

156156
#define VAL_DECIMAL(v) ((v)->data.decimal)
157157
#define SET_DECIMAL(v,n) VAL_SET(v, REB_DECIMAL), VAL_DECIMAL(v) = (n)
158+
#define AS_DECIMAL(v) (IS_INTEGER(v) ? (REBDEC)VAL_INT64(v) : VAL_DECIMAL(v))
158159

159160
typedef deci REBDCI;
160161
#define VAL_DECI(v) ((v)->data.deci)

0 commit comments

Comments
 (0)