title: how to assign data in Byte type array
body: <p>This is segment of code of 3dcpptutorials ray tracing. Can someone explain me how this lines of code works ? </p>
  
  <p>As I understand it, if it's less than <code>0</code>, it stores <code>0</code> and if it's greater than <code>1</code>, then <code>255</code> and if it's between, then <code>value * 255</code>, something like that. Am I correct ?</p>
  
  <pre><code>colorbuffer[2] = Color.r &lt;= 0.0f ? 0 : Color.r &gt;= 1.0 ? 255 : (BYTE)(Color.r * 255);
  colorbuffer[1] = Color.g &lt;= 0.0f ? 0 : Color.g &gt;= 1.0 ? 255 : (BYTE)(Color.g * 255);
  colorbuffer[0] = Color.b &lt;= 0.0f ? 0 : Color.b &gt;= 1.0 ? 255 : (BYTE)(Color.b * 255);
  </code></pre>