ProtoFlux:Angle: Difference between revisions

From Resonite Wiki
note on DeltaAngle
touch up said note
 
Line 17: Line 17:
The vectors you provide are normalized (but not clamped), which means each value will be between <code>-1</code> and <code>1</code>, with resulting degrees of <code>0</code> (if the 2 vectors are so close to each other that there is effectively no separation, thus no angle) all the way to <code>180</code> (if the 2 vectors are so far apart that they are a straight line) respectively.
The vectors you provide are normalized (but not clamped), which means each value will be between <code>-1</code> and <code>1</code>, with resulting degrees of <code>0</code> (if the 2 vectors are so close to each other that there is effectively no separation, thus no angle) all the way to <code>180</code> (if the 2 vectors are so far apart that they are a straight line) respectively.


If you're using 2D vectors and need to know whether the second is rotated clockwise or counterclockwise relative to the first, use [[ProtoFlux:DeltaAngle|DeltaAngle]].
{{Note|If you're using 2D vectors and need to know the sign of the angle (i.e. whether the second vector is closer clockwise or counterclockwise to the first), use [[ProtoFlux:DeltaAngle|DeltaAngle]].|suggestion}}


== Inputs ==
== Inputs ==

Latest revision as of 20:53, 26 September 2025

°

(angle)

A
*
B
Vectors

The Angle node takes in 2 vectors (rays or directions) and returns the difference between the 2 provided vectors using angles in degrees as a float.

The vectors you provide are normalized (but not clamped), which means each value will be between -1 and 1, with resulting degrees of 0 (if the 2 vectors are so close to each other that there is effectively no separation, thus no angle) all the way to 180 (if the 2 vectors are so far apart that they are a straight line) respectively.

If you're using 2D vectors and need to know the sign of the angle (i.e. whether the second vector is closer clockwise or counterclockwise to the first), use DeltaAngle.

Inputs

A (Pseudo-Generic)

The first provided vector.

B (Pseudo-Generic)

The second provided vector.

Outputs

* (float)

Returns the difference between the 2 provided vectors using angles in degrees.

See Also

  • Wikipedia's definition of an angle.