Remove BitMask files

pull/62/head
hevinci 2022-12-03 18:07:52 +08:00
parent 2696da092d
commit 4ec5a126ac
4 changed files with 0 additions and 160 deletions

View File

@ -1,69 +0,0 @@
using System;
namespace YooAsset
{
internal struct BitMask32
{
private int _mask;
public static implicit operator int(BitMask32 mask) { return mask._mask; }
public static implicit operator BitMask32(int mask) { return new BitMask32(mask); }
public BitMask32(int mask)
{
_mask = mask;
}
/// <summary>
/// 打开位
/// </summary>
public void Open(int bit)
{
if (bit < 0 || bit > 31)
throw new ArgumentOutOfRangeException();
else
_mask |= 1 << bit;
}
/// <summary>
/// 关闭位
/// </summary>
public void Close(int bit)
{
if (bit < 0 || bit > 31)
throw new ArgumentOutOfRangeException();
else
_mask &= ~(1 << bit);
}
/// <summary>
/// 位取反
/// </summary>
public void Reverse(int bit)
{
if (bit < 0 || bit > 31)
throw new ArgumentOutOfRangeException();
else
_mask ^= 1 << bit;
}
/// <summary>
/// 所有位取反
/// </summary>
public void Inverse()
{
_mask = ~_mask;
}
/// <summary>
/// 比对位值
/// </summary>
public bool Test(int bit)
{
if (bit < 0 || bit > 31)
throw new ArgumentOutOfRangeException();
else
return (_mask & (1 << bit)) != 0;
}
}
}

View File

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 60c7594328ef976408edadfdf2b9aa3d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,69 +0,0 @@
using System;
namespace YooAsset
{
internal struct BitMask64
{
private long _mask;
public static implicit operator long(BitMask64 mask) { return mask._mask; }
public static implicit operator BitMask64(long mask) { return new BitMask64(mask); }
public BitMask64(long mask)
{
_mask = mask;
}
/// <summary>
/// 打开位
/// </summary>
public void Open(int bit)
{
if (bit < 0 || bit > 63)
throw new ArgumentOutOfRangeException();
else
_mask |= 1L << bit;
}
/// <summary>
/// 关闭位
/// </summary>
public void Close(int bit)
{
if (bit < 0 || bit > 63)
throw new ArgumentOutOfRangeException();
else
_mask &= ~(1L << bit);
}
/// <summary>
/// 位取反
/// </summary>
public void Reverse(int bit)
{
if (bit < 0 || bit > 63)
throw new ArgumentOutOfRangeException();
else
_mask ^= 1L << bit;
}
/// <summary>
/// 所有位取反
/// </summary>
public void Inverse()
{
_mask = ~_mask;
}
/// <summary>
/// 比对位值
/// </summary>
public bool Test(int bit)
{
if (bit < 0 || bit > 63)
throw new ArgumentOutOfRangeException();
else
return (_mask & (1L << bit)) != 0;
}
}
}

View File

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 6b03684bc5163694ab3983243512b4cc
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: