aboutsummaryrefslogtreecommitdiffstats
path: root/math/imaxdiv.c
blob: 52b5d39720c18a7aa195d711dc47be102dcecd6f (plain) (blame)
1
2
3
4
5
6
7
#include "maths.h"

imaxdiv_t imaxdiv(intmax_t numerator, intmax_t denominator)
{
	return (imaxdiv_t){.quot = numerator / denominator,
			   .rem = numerator % denominator};
}