using System; namespace NW4RTools { public static class Misc { public static int AlignUp(int val, int to) { return (val + (to - 1)) & ~(to - 1); } public static uint AlignUp(uint val, uint to) { return (val + (to - 1)) & ~(to - 1); } public static int AlignDown(int val, int to) { return val & ~(to - 1); } public static uint AlignDown(uint val, uint to) { return val & ~(to - 1); } } }