The dot product operation (·) calculates the degree of similarity of a vec2 pair based on their angles and lengths.
Calculated as ‖a‖‖b‖cos(θ), it represents the product of their lengths (‖a‖‖b‖) scaled by the alignment of their directions (cos(θ)). The output ranges from the positive to negative product of their lengths based on when they are pointing in the same or opposite directions. If either vec2 has zero length, the output is 0.
Interface
Inputs
| Parameter | Details | Possible Types |
|---|---|---|
| Value | An operand of the dot product operation. Primary Input | Vec2[]Vec2 |
| Other Value | The other operand of the dot product operation. Default: | Vec2[]Vec2 |
| Normalize | Whether to normalize both input vec2s so the calculation ranges in Default: | bool[]bool |
Outputs
| Product | Details | Possible Types |
|---|---|---|
| Result | The value produced by the node operation. Primary Output | f64f64[] |