Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix rust/44095 (f64::clamp) todos #522

Closed
wants to merge 1 commit into from

Conversation

LetsMelon
Copy link

A pull request must contain a meaningful improvement to the project.

This PR only fixes TODO's for the f64::clamp rfc.
f64::clampis in rust since 1.50.0 -> doc.rust-lang.org

@RazrFalcon
Copy link
Owner

This is not really a fix. float::clamp from std will panic if min/max is NaN, while our code will not (in release). So there should be a different approach.

Ideally, we should prove that numbers are finite to begin with, but this would require a significant changes to the resvg.

@LetsMelon
Copy link
Author

Oh, I haven't thought about that.
Then maybe replace the TODO's with a comment, why resvg is using a homemade clap function instead of the std.

@RazrFalcon
Copy link
Owner

Yes, this is an outdated comment/todo, sorry.

@LetsMelon
Copy link
Author

No problem, but then I'm going to close this PR.

@LetsMelon LetsMelon closed this Jul 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants