Skip to content

Atan2

Overview

Computes the function atan2(y, x) using the math library

Discussion

Computes the funtion atan2(y, x) using the math library. The output is in the range -pi <= atan2() <= +pi

Module Pack

Standard

ClassID

classID = 84

Type Definition

typedef struct _ModuleAtan2
{
ModuleInstanceDescriptor instance;            // Common Audio Weaver module instance structure
} ModuleAtan2Class;

Pins

Input Pins

Name y
Description Input signal y
Data type float
Channel range Unrestricted
Block size range Unrestricted
Sample rate range Unrestricted
Complex support Real
Name x
Description Input signal x
Data type float
Channel range Unrestricted
Block size range Unrestricted
Sample rate range Unrestricted
Complex support Real

Output Pins

Name out
Description Output signal atan2(y, x)
Data Type float

Matlab Usage

File Name: atan2_module.m 
 M=atan2_module(NAME) 
 Creates an Audio Weaver module that computes the function atan(x) 
 using the standard math library. 
    NAME - name of the module. 

Copyright (c) 2026 DSP Concepts, Inc.