Go to file
2017-10-31 10:09:27 -05:00
2017-04-07 08:47:54 -05:00
2017-04-07 08:47:54 -05:00
2017-06-09 10:37:38 -05:00
2017-10-31 10:09:27 -05:00
2017-10-14 19:34:51 -07:00
2017-10-31 10:06:22 -05:00

Handmade-Math


Build Status

A single-file, cross-platform, public domain game math library for C/C++.

To get started, go download the latest release.

This library is free and will stay free, but if you would like to support development, or you are a company using HandmadeMath, please consider financial support.

Patreon PayPal

Version Changes
1.4.0 Fixed bug when using C mode. SSE'd all vec4 operations. Removed zeroing for better performance.
1.3.0 Removed need to #define HANDMADE_MATH_CPP_MODE. C++ definitions are now included automatically in C++ environments.
1.2.0 Added equality functions for HMM_Vec2, HMM_Vec3, and HMM_Vec4, and SSE'd HMM_MultiplyMat4 and HMM_Transpose.
1.1.5 Added Width and Height to HMM_Vec2, and made it so you can supply your own SqrtF.
1.1.4 Fixed SSE being included on platforms that don't support it, and fixed divide-by-zero errors when normalizing zero vectors.
1.1.3 Fixed compile error in C mode
1.1.2 Fixed invalid HMMDEF's in the function definitions
1.1.1 Resolved compiler warnings on gcc and g++
1.1 Quaternions!
1.0 Lots of testing
0.7 Added HMM_Vec2, and HMM_Vec4 versions of HMM_LengthSquared, HMM_Length, and HMM_Normalize.
0.6 Made HMM_Power faster, Fixed possible efficiency problem with HMM_Normalize, RENAMED HMM_LengthSquareRoot to HMM_LengthSquared, RENAMED HMM_RSqrtF to HMM_RSquareRootF, RENAMED HMM_SqrtF to HMM_SquareRootF, REMOVED Inner function (user should use Dot now), REMOVED HMM_FastInverseSquareRoot function declaration
0.5.2 Fixed SSE code in HMM_SqrtF and HMM_RSqrtF
0.5.1 Fixed HMM_Translate producing row-major matrices, ensured column-major order for matrices throughout
0.5 Added scalar operations on vectors and matrices, added += and -= for hmm_mat4, reconciled headers and implementations, tidied up in general
0.4 Added SSE Optimized HMM_SqrtF, HMM_RSqrtF, Removed use of C Runtime
0.3 Added +=,-=, *=, /= for hmm_vec2, hmm_vec3, hmm_vec4
0.2b Disabled warning C4201 on MSVC, Added 64bit percision on HMM_PI
0.2a Prefixed Macros
0.2 Updated Documentation, Fixed C Compliance, Prefixed all functions, and added better operator overloading
0.1 Initial Version

This library is free and will stay free, but if you would like to support development, or you are a company using HandmadeMath, please consider financial support.

FAQ

What's the license?

This library is in the public domain. You can do whatever you want with it.

Where can I contact you to ask questions?

Feel free to make Github issues for any questions, concerns, or problems you encounter.

Description
A simple math library for games and computer graphics. Compatible with both C and C++. Public domain and easy to modify.
Readme CC0-1.0 3.9 MiB
Languages
C 95.7%
Python 2.2%
Makefile 1.2%
Batchfile 0.8%