[Rock-dev] base::Angle

Felix Rehrmann felix.rehrmann at dfki.de
Fri Apr 12 11:58:59 CEST 2013


Hi,

if I understand the invert function correctly I would prefer to call it 
opposite or oppositeDirection (inversion sounds somehow strange with 
regard to angles).

Felix

Am 12.04.2013 11:48, schrieb Janosch Machowinski:
> Hey,
> I want to extend base::Angle by two methods but I am not
> sure about the naming of the methods.
>
> One would be :
>       /**
>        * Inverts the current angle
>        * */
>       inline Angle &invert()
>       {
>           if(rad < 0)
>               rad += M_PI;
>           else
>               rad -=M_PI;
>           return *this;
>       }
>
>
> The other would be :
>       Angle operator-()
>       {
>           rad = -rad;
>       }
>
> Is this an correct intuitive naming scheme ?
> Better ideas ?
> Greetings
>       Janosch
>
>
> _______________________________________________
> Rock-dev mailing list
> Rock-dev at dfki.de
> http://www.dfki.de/mailman/cgi-bin/listinfo/rock-dev


-- 

  Felix Rehrmann
  Researcher
  
  DFKI Bremen
  Robotics Innovation Center
  Robert-Hooke-Straße 5
  28359 Bremen, Germany
  
  Phone: +49 (0)421 178 45-4129
  Fax:   +49 (0)421 218-64150
  E-Mail: felix.rehrmann at dfki.de
  
  Weitere Informationen: http://www.dfki.de/robotik
  -----------------------------------------------------------------------
  Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH
  Firmensitz: Trippstadter Straße 122, D-67663 Kaiserslautern
  Geschaeftsfuehrung: Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster
  (Vorsitzender) Dr. Walter Olthoff
  Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes
  Amtsgericht Kaiserslautern, HRB 2313
  Sitz der Gesellschaft: Kaiserslautern (HRB 2313)
  USt-Id.Nr.:    DE 148646973
  Steuernummer:  19/673/0060/3
  -----------------------------------------------------------------------



More information about the Rock-dev mailing list