| 1950 | //---------------------------------------------------------------------------- |
| 1951 | template <class VectorT1, class VectorT2, class VectorT3> |
| 1952 | void vtkMath::Cross(VectorT1&& a, VectorT2&& b, VectorT3& c) |
| 1953 | { |
| 1954 | typedef typename vtkMatrixUtilities::ScalarTypeExtractor<VectorT3>::value_type ValueType; |
| 1955 | ValueType Cx = a[1] * b[2] - a[2] * b[1]; |
| 1956 | ValueType Cy = a[2] * b[0] - a[0] * b[2]; |
| 1957 | ValueType Cz = a[0] * b[1] - a[1] * b[0]; |
| 1958 | c[0] = Cx; |
| 1959 | c[1] = Cy; |
| 1960 | c[2] = Cz; |
| 1961 | } |
| 1962 | |
| 1963 | //---------------------------------------------------------------------------- |
| 1964 | // Cross product of two 3-vectors. Result (a x b) is stored in c[3]. |
no outgoing calls
no test coverage detected