Skip to content

Commit

Permalink
Fix comment inconsistency
Browse files Browse the repository at this point in the history
  • Loading branch information
nickyMcDonald committed Jul 24, 2024
1 parent 7df44cb commit 692c757
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Raylib-cs/types/Color.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public Color(int r, int g, int b)
/// </summary>
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.G = (byte)((g < 0) ? 0 : ((g > 1) ? 255 : ((g * 255) + .5f)));
this.B = (byte)((b < 0) ? 0 : ((b > 1) ? 255 : ((b * 255) + .5f)));
Expand All @@ -110,7 +110,7 @@ public Color(float r, float g, float b, float a)
/// </summary>
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.G = (byte)((g < 0) ? 0 : ((g > 1) ? 255 : ((g * 255) + .5f)));
this.B = (byte)((b < 0) ? 0 : ((b > 1) ? 255 : ((b * 255) + .5f)));
Expand Down

0 comments on commit 692c757

Please sign in to comment.