Jump to content

Small Typo in the 'Math_.h' Rgba


Go to solution Solved by Josh,

Recommended Posts

Posted

Not an important one, but some stricter compilers or parsers will break on line 258 in Math_.h

inline unsigned int Rgba(const unsigned char r, unsigned const char g, unsigned const char b, unsigned const char a = 255)
{
	return Clamp(r, 0, 255) | (Clamp(g, 0, 255) << 8) | (Clamp(b, 0, 255) << 16) | (Clamp(a, 0, 255) << 24);;
}

should be:

inline unsigned int Rgba(const unsigned char r, const unsigned char g, const unsigned char b, const unsigned char a = 255)
{
	return Clamp(r, 0, 255) | (Clamp(g, 0, 255) << 8) | (Clamp(b, 0, 255) << 16) | (Clamp(a, 0, 255) << 24);;
}

the const keyword is aligned wrong for the parameters g,b and a.

  • Thanks 1
  • Windows 10 Pro 64-Bit-Version
  • NVIDIA Geforce 1080 TI

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...