From 3bd383baf6a17e734329e1fc677c7e86283db772 Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Mon, 26 Oct 2015 22:52:36 +0800 Subject: Added support for relative line numbers. Added instructions for, brk and cont. (They are still untested...) Parser code cleanup. Removed garbage output to stderr. Reorganize the repository structure. Updated BLR2 code move it into archive. Added BLR1 files. --- archive/hge/CxImage/ximath.h | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 archive/hge/CxImage/ximath.h (limited to 'archive/hge/CxImage/ximath.h') diff --git a/archive/hge/CxImage/ximath.h b/archive/hge/CxImage/ximath.h new file mode 100644 index 0000000..014c14b --- /dev/null +++ b/archive/hge/CxImage/ximath.h @@ -0,0 +1,39 @@ +#if !defined(__ximath_h) +#define __ximath_h + +#include "ximadef.h" + +//***bd*** simple floating point point +class DLL_EXP CxPoint2 +{ +public: + CxPoint2(); + CxPoint2(float const x_, float const y_); + CxPoint2(CxPoint2 const &p); + + float Distance(CxPoint2 const p2); + float Distance(float const x_, float const y_); + + float x,y; +}; + +//and simple rectangle +class DLL_EXP CxRect2 +{ +public: + CxRect2(); + CxRect2(float const x1_, float const y1_, float const x2_, float const y2_); + CxRect2(CxPoint2 const &bl, CxPoint2 const &tr); + CxRect2(CxRect2 const &p); + + float Surface() const; + CxRect2 CrossSection(CxRect2 const &r2) const; + CxPoint2 Center() const; + float Width() const; + float Height() const; + + CxPoint2 botLeft; + CxPoint2 topRight; +}; + +#endif -- cgit v1.2.3