ProtoFlux:Atan2: Difference between revisions

From Resonite Wiki
Create page and add basic information
 
Added a Further Reading section and a video.
 
(2 intermediate revisions by 2 users not shown)
Line 13: Line 13:
|}}
|}}


The '''Atan2''' node returns the [https://en.wikipedia.org/wiki/Atan2| 2-argument arctangent] of the point with the input X and Y coordinates. The output value is the angle between the positive x axis and the point in [https://en.wikipedia.org/wiki/Cartesian_coordinate_system| the Cartesian coordinate system].
The '''Atan2''' node returns the [https://en.wikipedia.org/wiki/Atan2 2-argument arctangent] of the point with the input X and Y coordinates. The output value is the angle between the positive x axis and the point in [https://en.wikipedia.org/wiki/Cartesian_coordinate_system the Cartesian coordinate system].


{{Template:Note|The output value is in [https://en.wikipedia.org/wiki/Radian radians]. If you want a value in degrees, multiply by the [[ProtoFlux:RadToDeg | RadToDeg]] node.|suggestion}}
{{Template:Note|The output value is in [https://en.wikipedia.org/wiki/Radian radians]. If you want a value in degrees, multiply by the [[ProtoFlux:Rad_2_Deg|Rad 2 Deg]] node.|suggestion}}


== Variants ==
== Variants ==
Line 25: Line 25:


== Inputs ==
== Inputs ==


=== Y (Pseudo-Generic) ===
=== Y (Pseudo-Generic) ===
Line 40: Line 39:


2-argument arctangent of Y and X.
2-argument arctangent of Y and X.
== Further Reading ==
=== Videos ===
<youtube>XOk0aGwZYn8</youtube>


[[Category:ProtoFlux:Math:Trigonometry]]
[[Category:ProtoFlux:Math:Trigonometry]]

Latest revision as of 20:38, 1 July 2024

Atan2
Y
*
X
Trigonometry

The Atan2 node returns the 2-argument arctangent of the point with the input X and Y coordinates. The output value is the angle between the positive x axis and the point in the Cartesian coordinate system.

The output value is in radians. If you want a value in degrees, multiply by the Rad 2 Deg node.

Variants

There are many variants of this node. The simplest take 2 scalar numeric-typed values. Some more complicated variants take one scalar and one vector or two same-sized vectors. In each case, the output has the same dimensions as the highest dimension input. Values are calculated element-wise, for example:

If the input Y is 1 and input X is [2;3] the output will be [Atan2(1,2);Atan2(1,3)].

Similarly if the input Y is [1;2] and the input X is [3;4] the output will be [Atan2(1,3);Atan2(2,4)].

Inputs

Y (Pseudo-Generic)

Input Y coordinate value.

X (Pseudo-Generic)

Input X coordinate value.

Outputs

* (Pseudo-Generic)

2-argument arctangent of Y and X.

Further Reading

Videos