summaryrefslogtreecommitdiffstats
path: root/Vertex.h
diff options
context:
space:
mode:
Diffstat (limited to 'Vertex.h')
-rw-r--r--Vertex.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/Vertex.h b/Vertex.h
index e7d47ce..2f3fcff 100644
--- a/Vertex.h
+++ b/Vertex.h
@@ -3,23 +3,23 @@
class Vertex {
private:
- double x, y;
+ float x, y;
public:
Vertex() {x = y = 0.0;}
Vertex(const Vertex &v) {x = v.x; y = v.y;}
- Vertex(double x, double y) {this->x = x; this->y = y;}
+ Vertex(float x, float y) {this->x = x; this->y = y;}
- double getX() const {return x;}
- void setX(double x) {this->x = x;}
+ float getX() const {return x;}
+ void setX(float x) {this->x = x;}
- double getY() const {return y;}
- void setY(double y) {this->y = y;}
+ float getY() const {return y;}
+ void setY(float y) {this->y = y;}
void setLocation(const Vertex &v) {x = v.x; y = v.y;}
- void setLocation(double x, double y) {this->x = x; this->y = y;}
+ void setLocation(float x, float y) {this->x = x; this->y = y;}
- double distanceSq(const Vertex &v) const;
- double distance(const Vertex &v) const;
+ float distanceSq(const Vertex &v) const;
+ float distance(const Vertex &v) const;
Vertex operator+(const Vertex &v) const;
Vertex operator-(const Vertex &v) const;