mirror of
https://github.com/golang/go
synced 2024-11-12 06:40:22 -07:00
doc/go1.5.html: fix typo.
Fixes #11704. Change-Id: If103f8eca7e53b0120885e2ec086db12176ea078 Reviewed-on: https://go-review.googlesource.com/12155 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
60b7d27c82
commit
443ec4f44d
@ -938,7 +938,7 @@ value to <code>RGBA</code> has become more precise.
|
||||
Previously, the low 8 bits were just an echo of the high 8 bits;
|
||||
now they contain more accurate information.
|
||||
Because of the echo property of the old code, the operation
|
||||
<code>uint8(r)</code> to extract an 8-bit red vaue worked, but is incorrect.
|
||||
<code>uint8(r)</code> to extract an 8-bit red value worked, but is incorrect.
|
||||
In Go 1.5, that operation may yield a different value.
|
||||
The correct code is, and always was, to select the high 8 bits:
|
||||
<code>uint8(r>>8)</code>.
|
||||
|
Loading…
Reference in New Issue
Block a user