snipt

Ctrl+h for KB shortcuts

Java

Loop Through All Values of Luminance

int dmod = frameCount%510;
int col = dmod<255?dmod:510-dmod;
https://snipt.net/embed/1401a9bebbf0fc3b97bc401abdc003ad/
/raw/1401a9bebbf0fc3b97bc401abdc003ad/
1401a9bebbf0fc3b97bc401abdc003ad
java
Java
2
2019-07-22T14:17:30
True
False
False
Aug 01, 2013 at 07:40 AM
/api/public/snipt/71174/
loop-through-all-values-of-luminance
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="kt">int</span> <span class="n">dmod</span> <span class="o">=</span> <span class="n">frameCount</span><span class="o">%</span><span class="mi">510</span><span class="o">;</span> </span><span id="L-2"><a name="L-2"></a><span class="kt">int</span> <span class="n">col</span> <span class="o">=</span> <span class="n">dmod</span><span class="o">&lt;</span><span class="mi">255</span><span class="o">?</span><span class="n">dmod</span><span class="o">:</span><span class="mi">510</span><span class="o">-</span><span class="n">dmod</span><span class="o">;</span> </span></pre></div> </td></tr></table>
color, processing