Skip to content

PartialOrd documentation is misleading #28166

Closed
@stephan-tolksdorf

Description

@stephan-tolksdorf

The documentation for cmp::PartialOrd states that "if a < b then !(a > b) and vice versa", but the "vice versa" is somewhat misleading here since !(a > b) doesn't imply a < b if e.g. either of the values is a NaN float. The author probably wanted to say that a > b also implies !(a < b).

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