servo / euclid

Geometry primitives (basic linear algebra) for Rust
Other
462 stars 103 forks source link

Switch to num_traits::real::Real instead of num_traits::Float where possible. #490

Closed adtennant closed 2 years ago

adtennant commented 2 years ago

This allows euclid to be more useable with types that do not necessarily have floating-point-specific characteristics such as NaN and infinity. e.g. Fixed point types.

num_traits has impl<T: Float> Real for T so existing code should continue to work.

nical commented 2 years ago

Looks good to me. Could you add a commit that bumps the version to 0.22.7?

adtennant commented 2 years ago

@nical Done 👍

bors-servo commented 2 years ago

:umbrella: The latest upstream changes (presumably #493) made this pull request unmergeable. Please resolve the merge conflicts.

nical commented 2 years ago

I'm so sorry this fell off my radar, I forgot and only remembered because bors-servo is telling me I caused a merge conflict here.

I fetched and rebased your PR in this branch of my fork: https://github.com/nical/euclid/tree/num-traits-real I can submit the PR again or you can fetch it or do the rebase (it was pretty simple to resolve).

nical commented 2 years ago

merged in #494.

adtennant commented 2 years ago

Thanks @nical. Sorry I missed the notifications over the weekend.