diff --git a/docs/changelog.md b/docs/changelog.md index 0e80e294..b659ab7a 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -28,6 +28,7 @@ Versioning currently follows `X.Y.Z` where ### Removed - `bfabric_legacy.py` has been removed. +- `math_helper.py` has been removed. ## \[1.13.8\] - 2024-10-03 diff --git a/src/bfabric/utils/math_helper.py b/src/bfabric/utils/math_helper.py deleted file mode 100644 index 7e20278f..00000000 --- a/src/bfabric/utils/math_helper.py +++ /dev/null @@ -1,9 +0,0 @@ -def div_int_ceil(n: int, d: int) -> int: - """ - :param n: Numerator - :param d: Denominator - :return: Performs integer ceiling division - Theoretically equivalent to math.ceil(n/d), but not subject to floating-point errors. - """ - q, r = divmod(n, d) - return q + bool(r) diff --git a/tests/bfabric/utils/test_math_helper.py b/tests/bfabric/utils/test_math_helper.py deleted file mode 100644 index 0f81be22..00000000 --- a/tests/bfabric/utils/test_math_helper.py +++ /dev/null @@ -1,15 +0,0 @@ -import unittest - -import bfabric.utils.math_helper as math_helper - - -class BfabricTestMath(unittest.TestCase): - def test_integer_division(self): - # Main purpose of dictionary sorting is that they appear consistent when printed - self.assertEqual(math_helper.div_int_ceil(120, 100), 2) - self.assertEqual(math_helper.div_int_ceil(200, 100), 2) - self.assertEqual(math_helper.div_int_ceil(245, 100), 3) - - -if __name__ == "__main__": - unittest.main(verbosity=2)