summaryrefslogtreecommitdiffstats
path: root/Vertex.cpp
diff options
context:
space:
mode:
authorneoraider <devnull@localhost>2008-04-06 15:29:03 +0200
committerneoraider <devnull@localhost>2008-04-06 15:29:03 +0200
commit356efaf89afdad141b313767e1a2b89de3c08d0a (patch)
tree37edb2a0fc0ea15f4f60e45ed411cbea7b4c12c5 /Vertex.cpp
parent258eb984bafe0f667d1e76de61c8afaa23f39ef4 (diff)
downloadzoomedit-356efaf89afdad141b313767e1a2b89de3c08d0a.tar
zoomedit-356efaf89afdad141b313767e1a2b89de3c08d0a.zip
zoomedit: Recreated ZoomEdit based on Glademm.
Diffstat (limited to 'Vertex.cpp')
-rw-r--r--Vertex.cpp55
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;
-}