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

avm1, avm2: Correct TextFormat properties coercion #5666

Merged
merged 3 commits into from
Nov 20, 2021

Conversation

relrelb
Copy link
Contributor

@relrelb relrelb commented Nov 15, 2021

Many properties are coerced using the IEEE-754 "Round to nearest, ties to even" rounding rule (e.g., both 1.5 and 2.5 will round to 2).
Although this is easy to do on most architectures, Rust provides no standard way to round in this manner (f64::round always rounds away from zero). For more info see: rust-lang/rust#55107
Add tests that also cover #5569 and #5610.

Put a single implementation in `ecma_conversions.rs`.
Need to consider what to do with the similar implementation in `matrix.rs`.
@relrelb relrelb merged commit 3760e0e into ruffle-rs:master Nov 20, 2021
@relrelb relrelb deleted the text_format branch November 20, 2021 11:36
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.

2 participants