diff options
-rw-r--r-- | Project/Bus.cpp | 3 | ||||
-rw-r--r-- | Project/ControlEditor.cpp | 3 | ||||
-rw-r--r-- | Project/ControlElement.cpp | 3 | ||||
-rw-r--r-- | Project/DegreesAndRadians.h | 10 | ||||
-rw-r--r-- | Project/ElectricCalculation.cpp | 3 | ||||
-rw-r--r-- | Project/Element.cpp | 3 | ||||
-rw-r--r-- | Project/Fault.cpp | 3 | ||||
-rw-r--r-- | Project/PowerElement.cpp | 3 | ||||
-rw-r--r-- | Project/Text.cpp | 3 |
9 files changed, 34 insertions, 0 deletions
diff --git a/Project/Bus.cpp b/Project/Bus.cpp index 9d0de98..69bca6d 100644 --- a/Project/Bus.cpp +++ b/Project/Bus.cpp @@ -1,4 +1,7 @@ #include "Bus.h" +#ifdef USING_WX_3_0_X +#include "DegreesAndRadians.h" +#endif Bus::Bus() : PowerElement() diff --git a/Project/ControlEditor.cpp b/Project/ControlEditor.cpp index a9d0213..27c5662 100644 --- a/Project/ControlEditor.cpp +++ b/Project/ControlEditor.cpp @@ -1,5 +1,8 @@ #include "ControlEditor.h" +#ifdef USING_WX_3_0_X +#include "DegreesAndRadians.h" +#endif #include "FileHanding.h" #include "Camera.h" #include "ControlElement.h" diff --git a/Project/ControlElement.cpp b/Project/ControlElement.cpp index d75c606..fa99206 100644 --- a/Project/ControlElement.cpp +++ b/Project/ControlElement.cpp @@ -1,4 +1,7 @@ #include "ControlElement.h" +#ifdef USING_WX_3_0_X +#include "DegreesAndRadians.h" +#endif Node::Node(wxPoint2DDouble position, NodeType nodeType, double borderSize) { diff --git a/Project/DegreesAndRadians.h b/Project/DegreesAndRadians.h new file mode 100644 index 0000000..a936ed7 --- /dev/null +++ b/Project/DegreesAndRadians.h @@ -0,0 +1,10 @@ +#ifndef DEGREESANDRADIANS_H +#define DEGREESANDRADIANS_H + +#include<wx/math.h> + +// Convert between degrees and radians. +inline double wxDegToRad(double deg) { return (deg * M_PI) / 180.0; } +inline double wxRadToDeg(double rad) { return (rad * 180.0) / M_PI; } + +#endif // DEGREESANDRADIANS_H diff --git a/Project/ElectricCalculation.cpp b/Project/ElectricCalculation.cpp index 8f8fa35..d024364 100644 --- a/Project/ElectricCalculation.cpp +++ b/Project/ElectricCalculation.cpp @@ -1,4 +1,7 @@ #include "ElectricCalculation.h" +#ifdef USING_WX_3_0_X +#include "DegreesAndRadians.h" +#endif ElectricCalculation::ElectricCalculation() {} ElectricCalculation::~ElectricCalculation() {} diff --git a/Project/Element.cpp b/Project/Element.cpp index ca24196..5b2b7d5 100644 --- a/Project/Element.cpp +++ b/Project/Element.cpp @@ -1,4 +1,7 @@ #include "Element.h" +#ifdef USING_WX_3_0_X +#include "DegreesAndRadians.h" +#endif Element::Element() { m_selectionColour.SetRGBA(0.0, 0.5, 1.0, 0.5); } diff --git a/Project/Fault.cpp b/Project/Fault.cpp index 725a3ec..505634e 100644 --- a/Project/Fault.cpp +++ b/Project/Fault.cpp @@ -1,4 +1,7 @@ #include "Fault.h" +#ifdef USING_WX_3_0_X +#include "DegreesAndRadians.h" +#endif Fault::Fault() : ElectricCalculation() diff --git a/Project/PowerElement.cpp b/Project/PowerElement.cpp index 03ab97e..e6a04ed 100644 --- a/Project/PowerElement.cpp +++ b/Project/PowerElement.cpp @@ -1,4 +1,7 @@ #include "PowerElement.h" +#ifdef USING_WX_3_0_X +#include "DegreesAndRadians.h" +#endif PowerElement::PowerElement() : Element() diff --git a/Project/Text.cpp b/Project/Text.cpp index 060e666..9fe4fe8 100644 --- a/Project/Text.cpp +++ b/Project/Text.cpp @@ -1,6 +1,9 @@ #include "TextForm.h" #include "Text.h" +#ifdef USING_WX_3_0_X +#include "DegreesAndRadians.h" +#endif #include "ElectricCalculation.h" #include "Bus.h" #include "Line.h" |