CrossProductNormed (FB)ΒΆ
FUNCTION_BLOCK CrossProductNormed
This function will calculate the Cartesian product of two vectors \(v_{1}, v_{2} \in \mathbb{R^{3}}\). The result will be returned in vector \(v = \frac{v_{1} \times v_{2}}{\left \| v_{1} \times v_{2}\right \|} \in \mathbb{R^{3}}\).
Note
Keep in mind that, due to rounding errors, the input of two collinear vectors will not necessarily result in the null vector.
- InOut:
Scope
Name
Type
Comment
Input
v1
Input vector \(v_{1} \in \mathbb{R}\)
v2
Input vector \(v_{2} \in \mathbb{R}\)
Output
v
Normed outer product \(v \in \mathbb{R^{3}}\)
xError
BOOL
Error flagTRUE
: If the calculated outer product yields the null vector so that scaling is not possible