# Implement RFC-240: make Angle's named methods const...

XMLWordPrintable

#### Details

• Type: Improvement
• Status: Done
• Resolution: Done
• Fix Version/s: None
• Component/s:
• Labels:
• Story Points:
6
• Sprint:
• Team:

#### Description

Change the named methods of Angle (which are wrap, wrapCtr, and wrapNear) to be const and to return a new Angle. This will clean up a lot of code.

Add separation(Angle other) -> Angle wrapped to [-pi, pi).

#### Activity

Hide
Krzysztof Findeisen added a comment -

In afw/geom/SphPoint.cc, the function wrap(Angle) -> Angle is a workaround for this issue. It should be removed as part of the fix.

Show
Krzysztof Findeisen added a comment - In afw/geom/SphPoint.cc , the function wrap(Angle) -> Angle is a workaround for this issue. It should be removed as part of the fix.
Hide
Krzysztof Findeisen added a comment -

Hi Lauren MacArthur, would you be willing to review this feature request + substantial code cleanup for afw::geom::Angle? Thanks.

Show
Krzysztof Findeisen added a comment - Hi Lauren MacArthur , would you be willing to review this feature request + substantial code cleanup for afw::geom::Angle ? Thanks.
Hide
Krzysztof Findeisen added a comment - - edited

Hi Jim Bosch, would you be willing to review this feature request + code cleanup for afw::geom::Angle?

This code also shows how delete can be used on arbitrary functions in C++; I confirmed that no expression trying to divide by an Angle will compile.

Show
Krzysztof Findeisen added a comment - - edited Hi Jim Bosch , would you be willing to review this feature request + code cleanup for afw::geom::Angle ? This code also shows how delete can be used on arbitrary functions in C++; I confirmed that no expression trying to divide by an Angle will compile.
Hide
Russell Owen added a comment -

Looks great! A few minor suggestions on github

Show
Russell Owen added a comment - Looks great! A few minor suggestions on github

#### People

Assignee:
Krzysztof Findeisen
Reporter:
Russell Owen
Reviewers:
Jim Bosch
Watchers:
Jim Bosch, Krzysztof Findeisen, Russell Owen