rename to Bits since some methods are now not just extension methods

Easier to type 'Bits' :)
This commit is contained in:
Gered 2013-09-08 12:55:07 -04:00
parent d7cfac6632
commit 3717e3f79b
2 changed files with 3 additions and 3 deletions

View file

@ -137,7 +137,6 @@
<Compile Include="Graphics\Helpers\FlatWireframeGrid.cs" />
<Compile Include="Support\StringBuilderExtensions.cs" />
<Compile Include="Graphics\Helpers\GraphicsHelpers.cs" />
<Compile Include="Support\BitExtensions.cs" />
<Compile Include="Support\ObjectPool.cs" />
<Compile Include="Support\IPoolable.cs" />
<Compile Include="Support\BasicObjectPool.cs" />
@ -229,6 +228,7 @@
<Compile Include="Graphics\Helpers\SkyBox.cs" />
<Compile Include="Graphics\Atlas\Json\JsonTextureAtlasAnimation.cs" />
<Compile Include="Math\RandomExtensions.cs" />
<Compile Include="Support\Bits.cs" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
<ItemGroup>

View file

@ -7,9 +7,9 @@ namespace Blarg.GameFramework.Support
//
// ... and of course, you can't use generics with bitwise operations :(
public static class BitExtensions
public static class Bits
{
public static int GetBitmaskFor(uint startBit, uint numBits)
public static int GetMaskFor(uint startBit, uint numBits)
{
int temp = MathHelpers.Pow(2, startBit);
return (temp * (MathHelpers.Pow(2, numBits))) - temp;