cartopol
Convert Cartesian values to polar format. Angles are in radians.
cartopol(x, y): [out1, out2]
Arguments:
Arguments
Name | Type | Default | Description |
---|---|---|---|
x | number | The x coordinate of a Cartesian pair to be converted into a polar coordinate pair consisting of distance and angle values. When used in an audio context, the value represents the real part of a frequency domain value to be converted into a polar coordinate pair consisting of amplitude and phase values. | |
y | number | The y coordinate of a Cartesian pair to be converted into a polar coordinate pair consisting of distance and angle values. When used in an audio context, the value represents the imaginary part of a frequency domain value to be converted into a polar coordinate pair consisting of amplitude and phase values. |
Returns
Name | Type | Description |
---|---|---|
out1 | number | The distance portion of the polar coordinate pair. When used in an audio context, the value represents the magnitude (amplitude) of the frequency represented by the currently input. |
out2 | number | The angle portion of the polar coordinate pair. When used in an audio context, the value represents the phase, expressed in radians, of the frequency represented by the current input. If only the left outlet is connected, the phase computation is not performed. |