Axiom.RenderSystems.OpenGL.GLTexture.MostSignificantBitSet C# (CSharp) Метод

MostSignificantBitSet() приватный Метод

Helper method for getting the next highest power of 2 value from the specified value.
Example: Input: 3 Result: 4, Input: 96 Output: 128
private MostSignificantBitSet ( int val ) : int
val int Integer value.
Результат int
		private int MostSignificantBitSet( int val )
		{
			int result = 0;

			while ( val != 0 )
			{
				result++;
				val >>= 1;
			}

			return result - 1;
		}