@@ -111,6 +111,7 @@ Urho3D development, contributions and bugfixes by:
- OvermindDL1
- Skrylar
- TheComet93
+- Y-way
- 1vanK
- andmar1x
- amadeus_osa
@@ -63,6 +63,7 @@ Urho3D development, contributions and bugfixes by:
@@ -166,11 +166,7 @@ template <> inline float Atan2<float>(float y, float x) { return M_RADTODEG * at
/// Check whether an unsigned integer is a power of two.
inline bool IsPowerOfTwo(unsigned value)
{
- if (!value)
- return true;
- while (!(value & 1))
- value >>= 1;
- return value == 1;
+ return !(value & (value - 1));
}
/// Round up to next power of two.