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

Clean up Angle's operators

    Details

    • Type: Improvement
    • Status: To Do
    • Resolution: Unresolved
    • Fix Version/s: None
    • Component/s: afw
    • Templates:
    • Story Points:
      3
    • Team:
      Alert Production

      Description

      Angle's API has a number of inconsistencies:

      • It supports * and *= for Angle, double, and int in any combination (though Angle only through implicit conversion in Python).
      • It supports += and -= for Angle, double and int, but + and - only for Angle in C++.
      • It supports += and -= only for Angle in Python.
      • It supports * for Angle directly, but *=, +=, and -= only through implicit conversion to double.
      • It supports / for double and int directly in C++, but supports int only through implicit conversion in Python.
      • It supports comparison operators between Angle and Angle, double, or int in Python, but only with other Angle objects in C++.
      • AngleUnit can be tested for inequality in Python but not C++.
      • Expressions like degrees * 42.0 are allowed in Python but not C++.

      The API should be reviewed with other DM programmers for which of these operations are desirable, and the code updated with more coherent handling.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                krzys Krzysztof Findeisen
                Reporter:
                krzys Krzysztof Findeisen
                Watchers:
                Krzysztof Findeisen, Russell Owen
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Summary Panel