Skip to main content
Log in

Mojo function

abs

abs(t: IntTuple[origin]) -> IntTuple

Compute the absolute value of each element in an IntTuple.

This function applies the absolute value operation to each integer in a potentially nested IntTuple structure.

Args:

  • t (IntTuple[origin]): The IntTuple to transform.

Returns:

A new IntTuple with the same structure but with absolute values.