<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
</head><body style="">
<div>
opposite() I also like better than invert().
</div>
<div>
 
</div>
<div>
cheers,
</div>
<div>
 
</div>
<div>
Jakob
</div>
<div>
<br/>On April 12, 2013 at 11:58 AM Felix Rehrmann <felix.rehrmann@dfki.de> wrote:
<br/>> Hi,
<br/>>
<br/>> if I understand the invert function correctly I would prefer to call it
<br/>> opposite or oppositeDirection (inversion sounds somehow strange with
<br/>> regard to angles).
<br/>>
<br/>> Felix
<br/>>
<br/>> Am 12.04.2013 11:48, schrieb Janosch Machowinski:
<br/>> > Hey,
<br/>> > I want to extend base::Angle by two methods but I am not
<br/>> > sure about the naming of the methods.
<br/>> >
<br/>> > One would be :
<br/>> > /**
<br/>> > * Inverts the current angle
<br/>> > * */
<br/>> > inline Angle &invert()
<br/>> > {
<br/>> > if(rad < 0)
<br/>> > rad += M_PI;
<br/>> > else
<br/>> > rad -=M_PI;
<br/>> > return *this;
<br/>> > }
<br/>> >
<br/>> >
<br/>> > The other would be :
<br/>> > Angle operator-()
<br/>> > {
<br/>> > rad = -rad;
<br/>> > }
<br/>> >
<br/>> > Is this an correct intuitive naming scheme ?
<br/>> > Better ideas ?
<br/>> > Greetings
<br/>> > Janosch
<br/>> >
<br/>> >
<br/>> > _______________________________________________
<br/>> > Rock-dev mailing list
<br/>> > Rock-dev@dfki.de
<br/>> > http://www.dfki.de/mailman/cgi-bin/listinfo/rock-dev
<br/>
<br/>
</div>
<div id="ox-signature">
 
</div>
</body></html>