Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-7913

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

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: afw
    • Story Points:
      6
    • Sprint:
      Alert Production S17 - 2, Alert Production S17 - 3
    • Team:
      Alert Production

      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).

        Attachments

          Issue Links

            Activity

            Hide
            krzys 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
            krzys 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
            krzys 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
            krzys 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
            krzys 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
            krzys 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
            rowen Russell Owen added a comment -

            Looks great! A few minor suggestions on github

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

              People

              Assignee:
              krzys Krzysztof Findeisen
              Reporter:
              rowen Russell Owen
              Reviewers:
              Jim Bosch
              Watchers:
              Jim Bosch, Krzysztof Findeisen, Russell Owen
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: