Skip to content

Instantly share code, notes, and snippets.

@Beyarz
Created June 8, 2024 12:37
Show Gist options
  • Save Beyarz/8fff38709e1f9f3bd3470be081e01e72 to your computer and use it in GitHub Desktop.
Save Beyarz/8fff38709e1f9f3bd3470be081e01e72 to your computer and use it in GitHub Desktop.
Shorter typdefs
typedef uint8_t u8;
typedef uint16_t u16;
typedef uint32_t u32;
typedef uint64_t u64;
typedef size_t umax;
typedef int8_t s8;
typedef int16_t s16;
typedef int32_t s32;
typedef int64_t s64;
// The sizes of float and double types can vary across different platforms and architectures.
// While most modern systems use IEEE 754 floating-point representations, where float is 32-bits and double is 64-bits,
// this is not a requirement of the C standard, so be aware if you run an old system from the 80s.
typedef float f32;
typedef double f64;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment