ProtoFlux:Distance: Difference between revisions

From Resonite Wiki
Filled in the node page.
Improve, don't remove.
 
(One intermediate revision by one other user not shown)
Line 14: Line 14:
|}}
|}}


The '''Distance''' node takes in 2 values and returns the distance/length between them.
The '''Distance''' node returns the [https://en.wikipedia.org/wiki/Euclidean_distance Euclidean distance] between two vectors. This is similar to using [[ProtoFlux:Sub|Sub]] and [[ProtoFlux:Value Abs|Value Abs]], just in one node.
 
{{Note|This is similar to using the [[ProtoFlux:Sub|Sub]] node, rearranging the inputs so the higher number is our main value to subtract from, then taking the result and removing the sign ([[ProtoFlux:Value Abs|Value Abs]] node). Using distance is easier and does all that calculation for you.|information}}


== Inputs ==
== Inputs ==


=== A (Pseudo-Generic) ===  
=== A (Pseudo-Generic) ===
 
The first vector.
The first value.


=== B (Pseudo-Generic) ===
=== B (Pseudo-Generic) ===
 
The second vector.
The second value.


== Outputs ==
== Outputs ==


=== * (Pseudo-Generic) ===
=== * (Pseudo-Generic) ===
 
The Euclidean distance between <code>A</code> and <code>B</code>.
The distance between 2 values.


[[Category:ProtoFlux:Operators]]
[[Category:ProtoFlux:Operators]]
[[Category:ProtoFlux:Operators:Vectors]]
[[Category:ProtoFlux:Operators:Vectors]]

Latest revision as of 10:38, 15 July 2024

Distance
A
*
B
Operators

The Distance node returns the Euclidean distance between two vectors. This is similar to using Sub and Value Abs, just in one node.

Inputs

A (Pseudo-Generic)

The first vector.

B (Pseudo-Generic)

The second vector.

Outputs

* (Pseudo-Generic)

The Euclidean distance between A and B.