core/vnl/vnl_double_2.h
Go to the documentation of this file.
00001 // This is core/vnl/vnl_double_2.h
00002 #ifndef vnl_double_2_h_
00003 #define vnl_double_2_h_
00004 #ifdef VCL_NEEDS_PRAGMA_INTERFACE
00005 #pragma interface
00006 #endif
00007 //:
00008 //  \file
00009 //  \brief  alias for vnl_vector_fixed<double,2>
00010 //  \author Andrew W. Fitzgibbon, Oxford RRG
00011 //  \date   31 Dec 96
00012 //
00013 // \verbatim
00014 //  Modifications
00015 //   Peter Vanroose, 25 June 1999: vnl_vector_fixed<double,2> already instantiated
00016 //   Peter Vanroose, 28 Mar. 2004: renamed cross_2d() to vnl_cross_2d()
00017 //   Peter Vanroose, 24 Mar. 2007: removed deprecated cross_2d() alias
00018 // \endverbatim
00019 
00020 #include <vnl/vnl_T_n.h>
00021 
00022 //: class vnl_double_2 : a vnl_vector of 2 doubles.
00023 vnl_T_n_impl(double,2);
00024 
00025 //: Cross product of two 2-vectors
00026 //  \relatesalso vnl_vector_fixed
00027 inline
00028 double vnl_cross_2d(vnl_double_2 const& v1, vnl_double_2 const& v2)
00029 {
00030   return v1[0] * v2[1] - v1[1] * v2[0];
00031 }
00032 
00033 #endif // vnl_double_2_h_