Skip to content

Commit 8460e60

Browse files
raskynigeltao
authored andcommitted
exp/shiny: fix a typo that prevented correct rounding
Change-Id: Id1c01d4e4b5c69fde195f1e56ccbd6760a8dbccc Reviewed-on: https://go-review.googlesource.com/100936 Reviewed-by: Nigel Tao <[email protected]>
1 parent 9673cff commit 8460e60

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

shiny/iconvg/buffer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ func (b *buffer) encode4ByteReal(f float32) {
164164
// Round the fractional bits (the low 23 bits) to the nearest multiple of
165165
// 4, being careful not to overflow into the upper bits.
166166
v := u & 0x007fffff
167-
if v < 0x007fffffe {
167+
if v < 0x007ffffe {
168168
v += 2
169169
}
170170
u = (u & 0xff800000) | v

0 commit comments

Comments
 (0)