Skip to main content
Log in

Mojo function

atan2

atan2[type: DType, simd_width: Int, //](y: SIMD[type, simd_width], x: SIMD[type, simd_width]) -> SIMD[$0, $1]

Computes the atan2 of the inputs.

Constraints:

The input must be a floating-point type.

Parameters:

  • ​type (DType): The dtype of the input and output SIMD vector.
  • ​simd_width (Int): The width of the input and output SIMD vector.

Args:

  • ​y (SIMD[type, simd_width]): The first input argument.
  • ​x (SIMD[type, simd_width]): The second input argument.

Returns:

The atan2 of the inputs.

Was this page helpful?