Skip to content

Carry bugs in angles module #180

Open

Description

@BatchelorJ

The function dec2hp includes tests for carry of seconds see angles.py:1040-1043. However, when rounding, the seconds carries into the minutes but the minutes aren't carried into the degrees. This can lead to invalid HP values (e.g. dec2hp(1 - 1e-13) returns 0.6 as in 0°60').

Separately, the __round__ dunders for DMSAngle and DDMAngle also include incorrect carry of rounded minutes / seconds. This also leads to invalid values (e.g. round(DMSAngle(0,59,59.9999),2) returns {DMSAngle: +0d 59m 60.0s)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions