::hwat::math::VectorAverage
Finds the average of two vectors.
Syntax
VectorAverage vector1 vector2 [weight1] [weight2]
Arguments
- vector1
- Tcl list of components for the first vector.
- vector2
- Tcl list of components for the second vector.
- weight1
- Weight for vector1.
- weight2
- Weight for vector2.
Returns
- Success
- A list containing the average of the two vectors.
- Failure
- {}
Example
::HWAT::MATH::VectorAverage [list 1.0 2.0 3.0] [list 4.0 5.0 6.0] .
Comments
This is a N-dimensional operation. The input lists must be of equal length and the returned list will be of the same length.