diff options
Diffstat (limited to 'Vertex.cpp')
-rw-r--r-- | Vertex.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,12 +1,12 @@ #include "Vertex.h" #include <math.h> -double Vertex::distanceSq(const Vertex &v) const { +float Vertex::distanceSq(const Vertex &v) const { return (x - v.x)*(x - v.x) + (y - v.y)*(y - v.y); } -double Vertex::distance(const Vertex &v) const { - return sqrt(distanceSq(v)); +float Vertex::distance(const Vertex &v) const { + return sqrtf(distanceSq(v)); } |