Making operations generic over CoordFloat #53
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This library is not currently usable unless your geometry uses
f64
coordinates.It's arguable whether most projects should use
f32
(IIUC most CPUs will still use 64-bit registers for 32-bit floating point math), but I think there is some value in considering support. If you are working with extremely large datasets in memory and don't need millimeter-level precision,f32
can save a ton of RAM, enabling you to work with even larger datasets. It also might enable better better SIMD optimizations in the future, since you can pack twice as much data in registers.I'm opening this as a draft PR since there are a few open questions, including whether this is even a welcome change :) This is just a first whack at a working implementation that shows it's possible, but we probably want to do the following before merge: