1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-11-24 07:32:01 +00:00
Ryujinx/Ryujinx.HLE/Utilities/IntUtils.cs

26 lines
587 B
C#
Raw Normal View History

namespace Ryujinx.HLE.Utilities
{
static class IntUtils
{
public static int AlignUp(int value, int size)
{
return (value + (size - 1)) & ~(size - 1);
}
public static long AlignUp(long value, int size)
{
return (value + (size - 1)) & ~((long)size - 1);
}
public static int AlignDown(int value, int size)
{
return value & ~(size - 1);
}
public static long AlignDown(long value, int size)
{
return value & ~((long)size - 1);
}
}
}