Fix comment inconsistency
This commit is contained in:
parent
7df44cbdf4
commit
692c757c71
1 changed files with 2 additions and 2 deletions
|
|
@ -96,7 +96,7 @@ public partial struct Color
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Color(float r, float g, float b, float a)
|
public Color(float r, float g, float b, float a)
|
||||||
{
|
{
|
||||||
// X = (byte)Math.Clamp(MathF.Round(r * 255), 0f, 255f);
|
// X = (byte)Math.Clamp(MathF.Round(x * 255), 0f, 255f);
|
||||||
this.R = (byte)((r < 0) ? 0 : ((r > 1) ? 255 : ((r * 255) + .5f)));
|
this.R = (byte)((r < 0) ? 0 : ((r > 1) ? 255 : ((r * 255) + .5f)));
|
||||||
this.G = (byte)((g < 0) ? 0 : ((g > 1) ? 255 : ((g * 255) + .5f)));
|
this.G = (byte)((g < 0) ? 0 : ((g > 1) ? 255 : ((g * 255) + .5f)));
|
||||||
this.B = (byte)((b < 0) ? 0 : ((b > 1) ? 255 : ((b * 255) + .5f)));
|
this.B = (byte)((b < 0) ? 0 : ((b > 1) ? 255 : ((b * 255) + .5f)));
|
||||||
|
|
@ -110,7 +110,7 @@ public partial struct Color
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Color(float r, float g, float b)
|
public Color(float r, float g, float b)
|
||||||
{
|
{
|
||||||
// X = (byte)Math.Clamp(MathF.Round(r * 255), 0f, 255f);
|
// X = (byte)Math.Clamp(MathF.Round(x * 255), 0f, 255f);
|
||||||
this.R = (byte)((r < 0) ? 0 : ((r > 1) ? 255 : ((r * 255) + .5f)));
|
this.R = (byte)((r < 0) ? 0 : ((r > 1) ? 255 : ((r * 255) + .5f)));
|
||||||
this.G = (byte)((g < 0) ? 0 : ((g > 1) ? 255 : ((g * 255) + .5f)));
|
this.G = (byte)((g < 0) ? 0 : ((g > 1) ? 255 : ((g * 255) + .5f)));
|
||||||
this.B = (byte)((b < 0) ? 0 : ((b > 1) ? 255 : ((b * 255) + .5f)));
|
this.B = (byte)((b < 0) ? 0 : ((b > 1) ? 255 : ((b * 255) + .5f)));
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue