mapbox / mapbox/wagyu

Add support for double and float

Open
#76 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
197
Forks
37
PR merge metrics
No merged PRs in 30d

Description

Currently the wagyu algorithm only works with integers, however, with some fine tuning it might be possible to support floating point numbers.

## Steps:

- [ ] Use Approximate equality
- [ ] [slope](https://github.com/mapbox/wagyu/blob/master/include/mapbox/geometry/wagyu/edge.hpp#L70-L74)
- [ ] [is_maxima](https://github.com/mapbox/wagyu/blob/master/include/mapbox/geometry/wagyu/active_bound_list.hpp#L119-L121)
- [ ] [is_intermediate](https://github.com/mapbox/wagyu/blob/master/include/mapbox/geometry/wagyu/active_bound_list.hpp#L128-L131)
- [ ] [eveywhere in point.hpp](https://github.com/mapbox/wagyu/blob/master/include/mapbox/geometry/wagyu/point.hpp)
- [ ] Add range to snap rounding? Disable snap rounding?
- [ ] Adjust topology correction?
- [ ] Update `poly2_contains_poly1` to handle floating points
- [ ] Fix edge building for floating points

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked locations in include/mapbox/geometry/wagyu/edge.hpp and active_bound_list.hpp, then review include/mapbox/geometry/wagyu/point.hpp and the poly2_contains_poly1 and edge-building code. The issue lists approximate equality, snap rounding, topology correction, containment, and edge construction as open areas. Done would require a defined floating-point design and passing coverage for double and float operations.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-graphics
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.