vnl_double_2.h
Go to the documentation of this file.
1 // This is core/vnl/vnl_double_2.h
2 #ifndef vnl_double_2_h_
3 #define vnl_double_2_h_
4 //:
5 // \file
6 // \brief alias for vnl_vector_fixed<double,2>
7 // \author Andrew W. Fitzgibbon, Oxford RRG
8 // \date 31 Dec 96
9 //
10 // \verbatim
11 // Modifications
12 // Peter Vanroose, 25 June 1999: vnl_vector_fixed<double,2> already instantiated
13 // Peter Vanroose, 28 Mar. 2004: renamed cross_2d() to vnl_cross_2d()
14 // Peter Vanroose, 24 Mar. 2007: removed deprecated cross_2d() alias
15 // \endverbatim
16 
17 #include <vnl/vnl_T_n.h>
18 
19 //: class vnl_double_2 : a vnl_vector of 2 doubles.
20 vnl_T_n_impl(double,2);
21 
22 //: Cross product of two 2-vectors
23 // \relatesalso vnl_vector_fixed
24 inline
25 double vnl_cross_2d(vnl_double_2 const& v1, vnl_double_2 const& v2)
26 {
27  return v1[0] * v2[1] - v1[1] * v2[0];
28 }
29 
30 #endif // vnl_double_2_h_
vnl_T_n_impl(double, 2)
class vnl_double_2 : a vnl_vector of 2 doubles.
T vnl_cross_2d(const vnl_vector< T > &v1, const vnl_vector< T > &v2)
Compute the 2-D cross product.
Definition: vnl_cross.h:24