From f030154fe727e25a2afe1f78b3998c2d2dba95e4 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Tue, 18 Aug 2009 09:24:15 +0000 Subject: astyle cleanup, corrects not loading of material textures --- src/math/vector2f.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/math/vector2f.cc') diff --git a/src/math/vector2f.cc b/src/math/vector2f.cc index 65f1f93..878304f 100644 --- a/src/math/vector2f.cc +++ b/src/math/vector2f.cc @@ -17,7 +17,7 @@ Vector2f::Vector2f() clear(); } -Vector2f::Vector2f(const Vector2f &other) +Vector2f::Vector2f(const Vector2f &other) { assign(other); } @@ -66,17 +66,17 @@ Vector2f &Vector2f::operator-=(const Vector2f &other) float distance(const Vector2f& first, const Vector2f& second) { float r = 0; - for (int i=0; i < 2; i++) - r += (first[i]-second[i])*(first[i]-second[i]); - + for (int i = 0; i < 2; i++) + r += (first[i] - second[i]) * (first[i] - second[i]); + return (sqrtf(r)); } float distancesquared(const Vector2f& first, const Vector2f& second) { float r = 0; - for (int i=0; i < 2; i++) - r += (first[i]-second[i])*(first[i]-second[i]); + for (int i = 0; i < 2; i++) + r += (first[i] - second[i]) * (first[i] - second[i]); return (r); } -- cgit v1.2.3