Skip to content

Contract violating Equals #5

@CodesInChaos

Description

@CodesInChaos

On floating point numbers == behaves in a way that violates the contract of Equals. So the behavior differs between == and Equals for such types.
One property Equals needs to have is that for every a : a.Equals(a).

NaN==NaN => false but NaN.Equals(NaN) => true

you need to mirror that property in your structs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions