mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
gfx: Fix imprecision in float_to_fixed
.
Improves text rendering a lot.
This commit is contained in:
parent
f7d2fb6ff8
commit
cdc59fe68a
1 changed files with 1 additions and 1 deletions
|
@ -110,7 +110,7 @@ pub fn transform_text(text: &str, mode: CompressionMode,
|
|||
}
|
||||
|
||||
pub fn float_to_fixed(before: int, f: f64) -> i32 {
|
||||
(1i32 << before as uint) * (f as i32)
|
||||
((1i32 << before as uint) as f64 * f) as i32
|
||||
}
|
||||
|
||||
pub fn fixed_to_float(before: int, f: i32) -> f64 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue