Round away from zero

This commit is contained in:
John Whitington 2024-05-10 10:50:35 +08:00
parent b0efb696f0
commit cdcfbdcc43
1 changed files with 1 additions and 1 deletions

View File

@ -80,7 +80,7 @@ let padding32 n =
i32ofi (padding (i32toi n)) i32ofi (padding (i32toi n))
let pdf_unit unitsPerEm x = let pdf_unit unitsPerEm x =
int_of_float (float_of_int x *. 1000. /. float_of_int unitsPerEm +. 0.5) int_of_float (Float.round (float_of_int x *. 1000. /. float_of_int unitsPerEm))
let string_of_tag t = let string_of_tag t =
Printf.sprintf "%c%c%c%c" Printf.sprintf "%c%c%c%c"