Skip to content

Update green.xml #754

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

Merged
merged 1 commit into from
May 28, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions content/api_en/green.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ Extracts the green value from a color, scaled to match current <b>colorMode()</b
<br />
The <b>green()</b> function is easy to use and understand, but it is slower than a technique called bit shifting. When working in <b>colorMode(RGB, 255)</b>, you can acheive the same results as <b>green()</b> but with greater speed by using the right shift operator (<b>>></b>) with a bit mask. For example, the following two lines of code are equivalent means of getting the green value of the color value <b>c</b>:<br />
<br />
<pre>float r1 = green(c); // Simpler, but slower to calculate
float r2 = c >> 8 & 0xFF; // Very fast to calculate</pre>
<pre>float g1 = green(c); // Simpler, but slower to calculate
float g2 = c >> 8 & 0xFF; // Very fast to calculate</pre>
]]></description>

</root>