00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef PLINT_DATA_TYPE_H
00026 #error Dont include me directly, but through data/type.h
00027 #endif
00028
00044 union _plint_2pt
00045 {
00046 struct
00047 {
00048 plint_pnt_t TopLeft, BotRight;
00049 } rect;
00051 struct
00052 {
00053 plint_pnt_t I, Z;
00054 } P;
00056 plint_pnt_t PP[2];
00058 #define PLINT_2pt_INIT(__1__, __2__) { PP:{ __1__, __2__ } }
00059 #define PLINT_2pt_INIT_NUL PLINT_2pt_INIT(PLINT_pnt_INIT_NUL, PLINT_pnt_INIT_NUL)
00060
00061 #define plint_2pt_new(__x__, __y__) ({ plint_2pt_t _tmp = { PP:{ __x__, __y__ } }; _tmp; })
00062 #define plint_2pt_TopLeft(__2pt__) (__2pt__).rect.TopLeft
00063 #define plint_2pt_BotRight(__2pt__) (__2pt__).rect.BotRight
00064 #define plint_2pt_P1 plint_2pt_TopLeft
00065 #define plint_2pt_P2 plint_2pt_BotRight
00066
00067 };
00068
00069 __BEGIN_DECLS
00070
00071 inline plint_2pt_t plint_2pt_canonic(plint_2pt_t ZPOINTS);
00072 inline plint_2pt_t plint_2pt_switch(plint_2pt_t ZPOINTS);
00073 inline plint_2pt_t plint_2pt_cross(plint_2pt_t ZPOINTS);
00074
00075 __END_DECLS
00076