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

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

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

/// <exception cref="ArgumentOutOfRangeException" />
public static int SetBit(ref int location,int bitNo)
{
   return location |= HInt32.Flag( bitNo );
}

/// <exception cref="ArgumentOutOfRangeException" />
public static long SetBit(ref long location,int bitNo)
{
   return location |= HInt64.Flag( bitNo );
}

/// <exception cref="ArgumentOutOfRangeException" />
public static short SetBit(ref short location,int bitNo)
{
   return location |= HInt16.Flag( bitNo );
}

/// <exception cref="ArgumentOutOfRangeException" />
public static byte SetBit(ref byte location,int bitNo)
{
   return location |= HByte.Flag( bitNo );
}

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

/// <exception cref="ArgumentOutOfRangeException" />
[CLSCompliant(false)]
public static uint SetBit(ref uint location,int bitNo)
{
   return location |= HUInt32.Flag( bitNo );
}

/// <exception cref="ArgumentOutOfRangeException" />
[CLSCompliant(false)]
public static ulong SetBit(ref ulong location,int bitNo)
{
   return location |= HUInt64.Flag( bitNo );
}

/// <exception cref="ArgumentOutOfRangeException" />
[CLSCompliant(false)]
public static ushort SetBit(ref ushort location,int bitNo)
{
   return location |= HUInt16.Flag( bitNo );
}

/// <exception cref="ArgumentOutOfRangeException" />
[CLSCompliant(false)]
public static sbyte SetBit(ref sbyte location,int bitNo)
{
   return location |= HSByte.Flag( bitNo );
}

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

} // CommonHelpers (.WASM)
