Browse Source

Tab to spaces. Cast to float in IntVector2::Length() to avoid warning spam.

Lasse Öörni 9 years ago
parent
commit
b09fd98bef
2 changed files with 2 additions and 2 deletions
  1. 1 1
      Source/Urho3D/LuaScript/pkgs/Math/Vector2.pkg
  2. 1 1
      Source/Urho3D/Math/Vector2.h

+ 1 - 1
Source/Urho3D/LuaScript/pkgs/Math/Vector2.pkg

@@ -60,7 +60,7 @@ class IntVector2
 
     String ToString() const;
     unsigned ToHash() const;
-	float Length() const;
+    float Length() const;
 
     int x_ @ x;
     int y_ @ y;

+ 1 - 1
Source/Urho3D/Math/Vector2.h

@@ -330,7 +330,7 @@ public:
     unsigned ToHash() const { return (unsigned)x_ * 31 + (unsigned)y_; }
 
     /// Return length.
-    float Length() const { return sqrtf(x_ * x_ + y_ * y_); }
+    float Length() const { return sqrtf((float)(x_ * x_ + y_ * y_)); }
 
     /// X coordinate.
     int x_;