Skip to content

Equality for floating point numbers of points #49

@flippmoke

Description

@flippmoke

https://github.com/mapbox/geometry.hpp/blob/master/include/mapbox/geometry/point.hpp#L25

template <typename T>
constexpr bool operator==(point<T> const& lhs, point<T> const& rhs)
{
    return lhs.x == rhs.x && lhs.y == rhs.y;
}

Would it be better in the case of double or float that we used an approximate equality here?

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