From 0f8911e29bd68af82cd6403e2c081f939477e265 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Tue, 25 Jun 2024 14:06:13 -0300 Subject: src/math.h: Add max_size() function --- src/math.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/math.h') diff --git a/src/math.h b/src/math.h index 4dab4a7..79b52f0 100644 --- a/src/math.h +++ b/src/math.h @@ -3,3 +3,8 @@ add_size(const size_t x, const size_t y, size_t *const out); int mul_size(const size_t x, const size_t y, size_t *const out); + +inline size_t +max_size(size_t x, size_t y) { + return x > y ? x : y; +} -- cgit v1.2.3