]> Shamusworld >> Repos - architektonas/blobdiff - src/base/vector.cpp
Removed unnecessary RS_ prefix from classes and whatnot.
[architektonas] / src / base / vector.cpp
index a733e732af4ddfeb671ab27ee9ceb79848cd7c76..0a98ba1fbcf015e6eac4f84c8494dafa75c0279c 100644 (file)
@@ -16,7 +16,7 @@
 
 #include "vector.h"
 
-#include "rs.h"                                                                        // For RS_MIN/MAXDOUBLE (!)
+#include "enums.h"                                                                     // For RS_MIN/MAXDOUBLE (!)
 #include "debug.h"
 #include "mathextra.h"
 
@@ -25,7 +25,7 @@
  */
 Vector::Vector()
 {
-    //RS_DEBUG->print("Vector::Vector");
+    //DEBUG->print("Vector::Vector");
     set(0.0, 0.0, 0.0);
 }
 
@@ -34,7 +34,7 @@ Vector::Vector()
  */
 Vector::Vector(double vx, double vy, double vz)
 {
-    //RS_DEBUG->print("Vector::Vector");
+    //DEBUG->print("Vector::Vector");
     set(vx, vy, vz);
 }
 
@@ -54,7 +54,7 @@ Vector::Vector(double vx, double vy, double vz)
  */
 Vector::Vector(bool valid)
 {
-       //RS_DEBUG->print("Vector::Vector");
+       //DEBUG->print("Vector::Vector");
        set(0.0, 0.0, 0.0);
        this->valid = valid;
 }
@@ -64,7 +64,7 @@ Vector::Vector(bool valid)
  */
 Vector::~Vector()
 {
-       //RS_DEBUG->print("Vector::~Vector");
+       //DEBUG->print("Vector::~Vector");
 }
 
 /**
@@ -100,7 +100,7 @@ double Vector::angle() const
        if (m > 1.0e-6)
        {
                double dp = dotP(*this, Vector(1.0, 0.0));
-               RS_DEBUG->print("Vector::angle: dp/m: %f/%f", dp, m);
+               DEBUG->print("Vector::angle: dp/m: %f/%f", dp, m);
 
                if (dp / m >= 1.0)
                        ret = 0.0;
@@ -141,7 +141,7 @@ double Vector::magnitude() const
        }
        else
        {
-               ret = sqrt(RS_Math::pow(x, 2) + RS_Math::pow(y, 2) + RS_Math::pow(z, 2));
+               ret = sqrt(Math::pow(x, 2) + Math::pow(y, 2) + Math::pow(z, 2));
        }
 
        return ret;
@@ -197,20 +197,20 @@ Vector Vector::move(Vector offset)
  */
 Vector Vector::rotate(double ang)
 {
-       RS_DEBUG->print("Vector::rotate: angle: %f", ang);
+       DEBUG->print("Vector::rotate: angle: %f", ang);
 
        double r = magnitude();
 
-       RS_DEBUG->print("Vector::rotate: r: %f", r);
+       DEBUG->print("Vector::rotate: r: %f", r);
 
        double a = angle() + ang;
 
-       RS_DEBUG->print("Vector::rotate: a: %f", a);
+       DEBUG->print("Vector::rotate: a: %f", a);
 
        x = cos(a) * r;
        y = sin(a) * r;
 
-       RS_DEBUG->print("Vector::rotate: x/y: %f/%f", x, y);
+       DEBUG->print("Vector::rotate: x/y: %f/%f", x, y);
 
        return *this;
 }
@@ -249,8 +249,8 @@ Vector Vector::scale(Vector center, Vector factor)
 Vector Vector::mirror(Vector axisPoint1, Vector axisPoint2)
 {
        /*
-       RS_ConstructionLine axis(NULL,
-               RS_ConstructionLineData(axisPoint1, axisPoint2));
+       ConstructionLine axis(NULL,
+               ConstructionLineData(axisPoint1, axisPoint2));
 
        Vector xp = axis.getNearestPointOnEntity(*this);
        xp = xp - (*this);