From: Sam Moore Date: Mon, 4 Aug 2014 11:16:58 +0000 (+0800) Subject: Apparently things were done X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=612d71e94fa4a4ca394fb1f566926392e95a2fa8;p=ipdf%2Fcode.git Apparently things were done --- diff --git a/src/main.cpp b/src/main.cpp index 2cfb73b..22a1662 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -97,8 +97,8 @@ int main(int argc, char ** argv) //doc.Add(BEZIER, Rect(0.2+x-4.0, 0.2+y-4.0, 0.6,0.6), (x^y)%3); } } - doc.Add(BEZIER, Rect(0.1,0.1,0.8,0.8), 0); - doc.Add(CIRCLE_FILLED, Rect(0.1,0.1,0.8,0.8), 0); + doc.Add(RECT_OUTLINE, Rect(0.1,0.1,0.8,0.8), 0); + //doc.Add(CIRCLE_FILLED, Rect(0.1,0.1,0.8,0.8), 0); } Debug("Start!"); Rect bounds(b[0],b[1],b[2],b[3]); diff --git a/src/real.h b/src/real.h index d8033fc..ecd3852 100644 --- a/src/real.h +++ b/src/real.h @@ -44,7 +44,6 @@ namespace IPDF inline float Float(const Real & r) {return r.m_value;} inline double Double(const Real & r) {return r.m_value;} #elif REAL == REAL_RATIONAL - typedef Rational Real; inline float Float(const Real & r) {return (float)r.ToDouble();} inline double Double(const Real & r) {return r.ToDouble();} diff --git a/src/vfpu.h b/src/vfpu.h index 8444afd..07bcacd 100644 --- a/src/vfpu.h +++ b/src/vfpu.h @@ -1,6 +1,7 @@ /** * @file vfpu.h * @brief Implements a terrible and hacky interface to use a virtual FPU to do floating point operations + * Updated with even more terror! Whatever floats the boat! */ #ifndef _VFPU_H @@ -17,6 +18,9 @@ namespace VFPU extern Register Exec(const Register & a, const Register & b, Opcode op, Rmode rmode = EVEN); // operate with registers extern float Exec(float a, float b, Opcode op, Rmode rmode = EVEN); //converts floats into registers and back + /** + * Wrapper class for floats where operations are done on the VFPU + */ class Float { public: @@ -26,7 +30,7 @@ namespace VFPU if (!init) { init = true; - VFPU::Start(); + VFPU::Start("flops.vcd"); } } Float(const Float & cpy) : m_value(cpy.m_value) {}