diff options
author | neoraider <devnull@localhost> | 2008-04-06 15:29:03 +0200 |
---|---|---|
committer | neoraider <devnull@localhost> | 2008-04-06 15:29:03 +0200 |
commit | 356efaf89afdad141b313767e1a2b89de3c08d0a (patch) | |
tree | 37edb2a0fc0ea15f4f60e45ed411cbea7b4c12c5 /Vertex.cpp | |
parent | 258eb984bafe0f667d1e76de61c8afaa23f39ef4 (diff) | |
download | zoomedit-356efaf89afdad141b313767e1a2b89de3c08d0a.tar zoomedit-356efaf89afdad141b313767e1a2b89de3c08d0a.zip |
zoomedit: Recreated ZoomEdit based on Glademm.
Diffstat (limited to 'Vertex.cpp')
-rw-r--r-- | Vertex.cpp | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/Vertex.cpp b/Vertex.cpp deleted file mode 100644 index 6e1f26b..0000000 --- a/Vertex.cpp +++ /dev/null @@ -1,55 +0,0 @@ -#include "Vertex.h" -#include <math.h> - -float Vertex::distanceSq(const Vertex &v) const { - return (x - v.x)*(x - v.x) + (y - v.y)*(y - v.y); -} - -float Vertex::distance(const Vertex &v) const { - return sqrtf(distanceSq(v)); -} - - -Vertex Vertex::operator+(const Vertex &v) const { - return Vertex(x + v.x, y + v.y); -} - -Vertex Vertex::operator-(const Vertex &v) const { - return Vertex(x - v.x, y - v.y); -} - -Vertex Vertex::operator*(float f) const { - return Vertex(x*f, y*f); -} - -Vertex Vertex::operator/(float f) const { - return Vertex(x/f, y/f); -} - -Vertex& Vertex::operator+=(const Vertex &v) { - x += v.x; - y += v.y; - - return *this; -} - -Vertex& Vertex::operator-=(const Vertex &v) { - x -= v.x; - y -= v.y; - - return *this; -} - -Vertex& Vertex::operator*=(float f) { - x *= f; - y *= f; - - return *this; -} - -Vertex& Vertex::operator/=(float f) { - x /= f; - y /= f; - - return *this; -} |