Skip to content

Instantly share code, notes, and snippets.

@API-Beast
Last active August 29, 2015 13:57
Show Gist options
  • Save API-Beast/9487367 to your computer and use it in GitHub Desktop.
Save API-Beast/9487367 to your computer and use it in GitHub Desktop.
Markdown extraction from source code for reference documentation.
// = Vec3
// T is the Type of the Vec3
template<typename T>
struct Vec3
{
//~ == Member accessors
union
{
struct
{
T X;
T Y;
T Z;
};
// These are provided for convenience:
struct
{
T R;
T G;
T B;
};
};
//~!
};
//~ == Typedefs
using Vec3F = Vec3<float>;
using Vec3I = Vec3<int>;
using Vec3U = Vec3<unsigned>;
//~!

Vec3

T is the Type of Vec3

Member accessors

T X;
T Y;
T Z;

These are provided for convenience:

T R;
T G;
T B;

Typedefs

using Vec3F = Vec3<float>;
using Vec3I = Vec3<int>;
using Vec3U = Vec3<unsigned>;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment