core/vnl/vnl_float_2.h
Go to the documentation of this file.
00001 // This is core/vnl/vnl_float_2.h
00002 #ifndef vnl_float_2_h_
00003 #define vnl_float_2_h_
00004 #ifdef VCL_NEEDS_PRAGMA_INTERFACE
00005 #pragma interface
00006 #endif
00007 //:
00008 // \file
00009 // \brief Contains class vnl_float_2
00010 // \author Andrew W. Fitzgibbon, Oxford RRG
00011 // \date   05 Aug 96
00012 //
00013 // \verbatim
00014 //  Modifications
00015 //   Peter Vanroose, 25 June 1999: vnl_vector_fixed<float,2> already instantiated
00016 //   Peter Vanroose, 23 Apr. 2004: added 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_float_2 : a vnl_vector of 2 floats.
00023 vnl_T_n_impl(float,2);
00024 
00025 //: Cross product of two 2-vectors
00026 //  \relatesalso vnl_vector_fixed
00027 inline
00028 float vnl_cross_2d(vnl_float_2 const& v1, vnl_float_2 const& v2)
00029 {
00030   return v1[0] * v2[1] - v1[1] * v2[0];
00031 }
00032 
00033 #endif // vnl_float_2_h_