IntUtils.cs 349 B

123456789101112131415
  1. namespace Ryujinx.HLE.OsHle.Utilities
  2. {
  3. static class IntUtils
  4. {
  5. public static int AlignUp(int Value, int Size)
  6. {
  7. return (Value + (Size - 1)) & ~(Size - 1);
  8. }
  9. public static long AlignUp(long Value, int Size)
  10. {
  11. return (Value + (Size - 1)) & ~((long)Size - 1);
  12. }
  13. }
  14. }