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

#if !WASM
namespace user_rtx { using u = user_rtx;
#else
namespace user_rtx.wasm { using u = user_rtx.wasm;
#endif

static partial class bitwise {
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

public static bool Check( int value, int testedFlags ) =>
   (value & testedFlags) == testedFlags;

public static bool Check( long value, long testedFlags ) =>
   (value & testedFlags) == testedFlags;

public static bool Check( short value, short testedFlags ) =>
   (value & testedFlags) == testedFlags;

public static bool Check( byte value, byte testedFlags ) =>
   (value & testedFlags) == testedFlags;

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

[CLSCompliant( false )]
public static bool Check( uint value, uint testedFlags ) =>
   (value & testedFlags) == testedFlags;

[CLSCompliant( false )]
public static bool Check( ulong value, ulong testedFlags ) =>
   (value & testedFlags) == testedFlags;

[CLSCompliant( false )]
public static bool Check( ushort value, ushort testedFlags ) =>
   (value & testedFlags) == testedFlags;

[CLSCompliant( false )]
public static bool Check( sbyte value, sbyte testedFlags ) =>
   (value & testedFlags) == testedFlags;

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
} // bitwise

} // user_rtx (.wasm)
