瀏覽代碼

Update contributor list. Remove unnecessary casts.

Eugene Kozlov 8 年之前
父節點
當前提交
2711d7b73f
共有 2 個文件被更改,包括 5 次插入4 次删除
  1. 1 0
      README.md
  2. 4 4
      Source/Urho3D/Math/Color.cpp

+ 1 - 0
README.md

@@ -129,6 +129,7 @@ Urho3D development, contributions and bugfixes by:
 - fredakilla
 - fredakilla
 - gleblebedev
 - gleblebedev
 - hdunderscore
 - hdunderscore
+- hsnabn
 - lhinuz
 - lhinuz
 - lvshiling
 - lvshiling
 - marynate
 - marynate

+ 4 - 4
Source/Urho3D/Math/Color.cpp

@@ -66,10 +66,10 @@ Vector3 Color::ToHSV() const
 
 
 void Color::FromUInt(unsigned color)
 void Color::FromUInt(unsigned color)
 {
 {
-    a_ = (float)(((color >> 24) & 0xff) / 255.0f);
-    b_ = (float)(((color >> 16) & 0xff) / 255.0f);
-    g_ = (float)(((color >> 8)  & 0xff) / 255.0f);
-    r_ = (float)(((color >> 0)  & 0xff) / 255.0f);
+    a_ = ((color >> 24) & 0xff) / 255.0f;
+    b_ = ((color >> 16) & 0xff) / 255.0f;
+    g_ = ((color >> 8)  & 0xff) / 255.0f;
+    r_ = ((color >> 0)  & 0xff) / 255.0f;
 }
 }
 
 
 void Color::FromHSL(float h, float s, float l, float a)
 void Color::FromHSL(float h, float s, float l, float a)