Point2D.cpp
Go to the documentation of this file.
00001 /*******************************************************************************
00002  *  Point2D.cpp
00003  *
00004  *  (C) 2008 AG Aktives Sehen <agas@uni-koblenz.de>
00005  *           Universitaet Koblenz-Landau
00006  *
00007  *  Additional information:
00008  *  $Id: $ 
00009  *******************************************************************************/
00010 
00011 #include "Point2D.h"
00012 
00013 #define THIS Point2D 
00014 
00015 float THIS::getPolarAngle () const
00016 {
00017   float angle = atan ( m_Y /m_X );
00018   if ( m_X < 0 )
00019   {
00020     angle = - ( M_PI - angle );
00021   }
00022   while ( angle >= M_PI )
00023   {
00024     angle -= 2*M_PI;
00025   }
00026   while ( angle < -M_PI )
00027   {
00028     angle += 2*M_PI;
00029   }
00030   return angle;
00031 }
00032 
00033 #undef THIS


robbie_architecture
Author(s): Viktor Seib
autogenerated on Mon Oct 6 2014 02:53:09