Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/math/vector2f.cc')
-rw-r--r--src/math/vector2f.cc12
1 files changed, 6 insertions, 6 deletions
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);
}