Skip to main content

Mojo function

divmod

divmod[T: DivModable](numerator: T, denominator: T) -> Tuple[T, T]

Performs division and returns the quotient and the remainder.

Parameters:

  • T (DivModable): A type conforming to the DivModable trait.

Args:

  • numerator (T): The dividend.
  • denominator (T): The divisor.

Returns:

Tuple: A Tuple containing the quotient and the remainder.

Was this page helpful?