rename to Bits since some methods are now not just extension methods
Easier to type 'Bits' :)
This commit is contained in:
parent
d7cfac6632
commit
3717e3f79b
|
@ -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>
|
||||
|
|
|
@ -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;
|
Reference in a new issue