//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
// CommonHelpers satellite library | Author: Sergei Y.Kitáev
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
using System;

#if !WASM
namespace CommonHelpers {
#else
namespace CommonHelpers.WASM {
#endif

//**************************************************************************************************
/// <summary>
/// </summary>
partial class HFlags {
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

public static int Cleared(int value,int flagsToClear)
{
   return value & ~flagsToClear;
}

public static long Cleared(long value,long flagsToClear)
{
   return value & ~flagsToClear;
}

public static short Cleared(short value,short flagsToClear)
{
   return unchecked( (short)( value & ~flagsToClear ) );
}

public static byte Cleared(byte value,byte flagsToClear)
{
   return unchecked( (byte)( value & ~flagsToClear ) );
}

//--------------------------------------------------------------------------------------------------

[CLSCompliant(false)]
public static uint Cleared(uint value,uint flagsToClear)
{
   return value & ~flagsToClear;
}

[CLSCompliant(false)]
public static ulong Cleared(ulong value,ulong flagsToClear)
{
   return value & ~flagsToClear;
}

[CLSCompliant(false)]
public static ushort Cleared(ushort value,ushort flagsToClear)
{
   return unchecked( (ushort)( value & ~flagsToClear ) );
}

[CLSCompliant(false)]
public static sbyte Cleared(sbyte value,sbyte flagsToClear)
{
   return unchecked( (sbyte)( value & ~flagsToClear ) );
}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
} // HFlags
//**************************************************************************************************

} // CommonHelpers (.WASM)
