diff --git a/HandmadeMath.h b/HandmadeMath.h index 834765c..00dbfbb 100644 --- a/HandmadeMath.h +++ b/HandmadeMath.h @@ -1,6 +1,49 @@ /* - Author: Zak Strange + HandmadeMath.h v0.1 + + This is a single header file with a bunch of useful functions for + basic game math operations. + ========================================================================== + You MUST + + #define HANDMADE_MATH_IMPLEMENTATION + in EXACTLY one C or C++ file that includes this header, BEFORE the + include, like this: + + #define HANDMADE_MATH_IMPLEMENTATION + #include "HandmadeMade.h" + + All other files should just #include "HandmadeMath.h" without the #define. + ========================================================================== + + For overloaded, and operator overloaded versions of the base C functions. + You MUST + + #define HANDMADE_MATH_CPP_MODE + + in EXACTLY one C or C++ file that includes this header, BEFORE the + include, like this: + + #define HANDMADE_MATH_IMPLEMENTATION + #define HANDMADE_MATH_CPP_MODE + #include "HandmadeMade.h" + + All other files should just #include "HandmadeMath.h" without the #define. + ========================================================================== + + LICENSE + + This software is in the public domain. Where that dedication is not + recognized, you are granted a perpetual, irrevocable license to copy, + distribute, and modify this file as you see fit. + + CREDITS + + Written by Zakary Strange (zak@strangedev.net) + + Fixes: + Jeroen van Rijn (@J_vanRijn) */ #ifndef HANDMADE_MATH_H @@ -19,7 +62,7 @@ extern "C" { #if _MSC_VER && !__INTEL_COMPILER #define HINLINE __inline #else -#define HINLLINE inline +#define HINLINE inline #endif typedef union vec2 diff --git a/main.c b/main.c index 24c0bd6..b852760 100644 --- a/main.c +++ b/main.c @@ -1,15 +1,6 @@ -/* - HANDMADE_MATH_IMPLEMENTATION: - This is for the implementation you want this. - - HANDMADE_MATH_CPP_MODE: - This will give the function overloaded and operator overloaded version of the functions -*/ - #include #define HANDMADE_MATH_IMPLEMENTATION -#define HANDMADE_MATH_CPP_MODE #include "HandmadeMath.h"