Commit 9e02a53c authored by Jiri (George) Lebl's avatar Jiri (George) Lebl Committed by George Lebl

whack the unneeded type field from mpw_t to save a byte per number and


Fri Mar 18 11:48:14 2005  George Lebl <jirka@5z.com>

	* src/mpwrap.[ch]: whack the unneeded type field from mpw_t to save
	  a byte per number and probably make alignment nicer and all that.
parent 9bfb60b9
Fri Mar 18 11:48:14 2005 George Lebl <jirka@5z.com>
* src/mpwrap.[ch]: whack the unneeded type field from mpw_t to save
a byte per number and probably make alignment nicer and all that.
Fri Mar 18 11:11:07 2005 George Lebl <jirka@5z.com>
* src/graphing.c, src/funclib.[ch]: Allow drawing longer lines with
......
This diff is collapsed.
......@@ -40,11 +40,6 @@ enum {
MPW_FLOAT
};
enum {
MPW_REAL = 1,
MPW_COMPLEX
};
/*number structures, this is where low level stuff is stored so it will be
different for each lib, members should never be directly accessed!*/
......@@ -67,16 +62,21 @@ typedef struct _MpwRealNum {
guint8 type;
} MpwRealNum;
/*any number (includes complex) so it includes an imaginary member if type
is MPW_COMPLEX
/*any number (includes complex) so it includes an imaginary member if
i is not equal to gel_zero
this is used as the number type*/
struct _mpw_t {
MpwRealNum *r; /*real*/
MpwRealNum *i; /*imaginary*/
guint8 type;
};
#define MPW_IS_COMPLEX(n) ((n)->i != gel_zero)
#define MPW_IS_REAL(n) ((n)->i == gel_zero)
/* Should not be used outside */
extern MpwRealNum *gel_zero;
extern MpwRealNum *gel_one;
typedef struct _mpw_t mpw_t[1];
typedef struct _mpw_t *mpw_ptr;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment