Commit Graph

132 Commits

Author SHA1 Message Date
Ben Visness
c7c801c51a Test overloaded versions of HMM_Dot 2016-08-30 15:56:15 -05:00
Zak Strange
86dfb43c1f Updated README.md 2016-08-30 13:55:14 -07:00
Zak Strange
de08310dbd Fixed HMM_Vec4 2016-08-30 13:46:50 -07:00
Zak Strange
fdef0ae0e1 Added missing tests to hmm_test.cpp 2016-08-30 13:43:17 -07:00
Zak Strange
c2dd9f19a7 Fixed more issues in Unit test 2016-08-30 13:33:15 -07:00
Zak Strange
c147a8bd53 Updated Unit Test 2016-08-30 13:30:52 -07:00
Zak Strange
8578602799 Fixed issues in last commit and added a function overloaded HMM_Dot 2016-08-30 13:24:55 -07:00
Zak Strange
b087efc561 Added HMM_DotVec2, HMM_DotVec3, and HMM_DotVec4 2016-08-30 12:05:33 -07:00
Zak Strange
712e5aa6db Fixed issue #33, #32, #27, #30 2016-08-30 11:58:26 -07:00
Zak Strange
3cecb5ec32 Merge pull request #36 from miblodelcarpio/master
Accelerate HMM_Power() with the squaring technique
2016-08-29 22:03:51 -04:00
Zak Strange
f4fb2a064b Merge pull request #25 from bvisness/unit-tests
Add unit tests
2016-08-29 22:03:44 -04:00
Matt Mascarenhas
cad7efa639 Accelerate HMM_Power() with the squaring technique
Thanks to @mmozeiko for the algorithm
2016-08-30 01:19:47 +01:00
Ben Visness
340f0bddbf Merge remote-tracking branch 'upstream/master' into unit-tests
# Conflicts:
#	README.md
2016-08-29 11:35:29 -05:00
Zak Strange
c58043db84 Merge pull request #26 from bvisness/bug-fixes
Fix issues that came up in testing
2016-08-29 11:27:22 -04:00
Ben Visness
44be431b65 Fix issues that came up in testing
Refs #25
2016-08-28 23:27:24 -05:00
Ben Visness
60cde5116e Correct rotation test to be right-handed 2016-08-28 23:11:40 -05:00
Ben Visness
3b0c8befbb Add tests for projection
(Zak should review)
2016-08-28 23:07:59 -05:00
Zak Strange
c9107ad5de Fixed README.md links 2016-08-28 10:24:35 -07:00
Ben Visness
7f7fc4e0d6 Add tests for transformations 2016-08-28 01:44:05 -05:00
Ben Visness
71dc1f4dee Scope things, and add tests for += and other operators 2016-08-28 01:22:12 -05:00
Ben Visness
7ca351ea16 Add tests for all arithmetic operations
Finding some bugs...
2016-08-28 00:24:10 -05:00
Ben Visness
d3eed13e85 Add tests for vector operations 2016-08-25 23:26:48 -05:00
Ben Visness
e07ee7357f Add tests for scalar math operations 2016-08-25 22:29:19 -05:00
Ben Visness
425fd9c11a Add remaining initialization tests 2016-08-25 22:29:03 -05:00
Zak Strange
b638056bcd Updated README.md and Fixed SSE code 2016-08-25 16:11:03 -07:00
Zak Strange
08baa85448 Merge pull request #24 from bvisness/column-major
Ensure column-major order for matrices and fix HMM_Translate
2016-08-25 17:29:09 -04:00
Ben Visness
603dcc2f4a Add Google Test setup and one unit test 2016-08-25 16:04:42 -05:00
Ben Visness
fa9f401844 Update README.md 2016-08-25 14:22:46 -05:00
Ben Visness
bcf7937eec Ensure column-major order for matrices and fix HMM_Translate
Most of the changes in this patch are cosmetic (such as looping by
columns first.) HMM_Translate was incorrectly producing row-major
matrices, which should now be fixed.

Fixes #22
2016-08-25 14:14:22 -05:00
Zak Strange
f8ff9972ee Merge pull request #19 from bvisness/improvements
Lots of improvements
2016-08-23 20:35:41 -04:00
Ben Visness
c9ec065fd5 Add documentation for v0.5 2016-08-23 18:20:59 -05:00
Ben Visness
077bdcd346 Initialize structs the Zak way
And generally make formatting consistent throughout.

Refs #20
2016-08-23 17:57:07 -05:00
Ben Visness
99bad6fd6e Clean up C++ versions of functions
Prefixed functions that needed it, added functions to match all new
operators, and ensured that headers were accurate.

Fixes #20
2016-08-23 15:39:35 -05:00
Ben Visness
c55baa9086 Ensure that all Result variables are initialized 2016-08-23 15:11:03 -05:00
Ben Visness
fb652d1467 Add lots and lots of missing operations
- Scalar multiplication of vectors and matrices
  - This was present for only vec2's and vec3's using operator
    overloading. In addition, there was only operator overloading for
    [structure] * float, not float * [structure].
  - Additionally, the two operators that were already defined were
    updated to use the new C-style functions that were defined.
- Scalar division of vectors and matrices
- Matrix subtraction
- += operator for matrices
2016-08-23 09:43:27 -05:00
Ben Visness
2c265f0e1d Add missing headers for operators
And flip the order of those two other operators, because having vec2
after vec3 was bugging me.
2016-08-22 19:00:04 -05:00
Ben Visness
03774f3d9c Merge remote-tracking branch 'upstream/master' 2016-08-20 20:54:57 -05:00
Zak Strange
d471f224fa Merge pull request #18 from bvisness/vec4v
Add ability to construct vec4 from vec3 and float
2016-08-20 21:31:36 -04:00
Zak Strange
afba6f4631 Merge pull request #17 from bvisness/add-mat4
Implement addition for mat4's
2016-08-20 21:29:45 -04:00
Ben Visness
a85eb07b3d Merge branch 'vec4v' 2016-08-20 19:50:08 -05:00
Ben Visness
83aa7f404a Merge branch 'add-mat4' 2016-08-20 19:49:57 -05:00
Ben Visness
6259f1b47f Add ability to construct vec4 from vec3 and float
This is very useful for applications using homogeneous coordinates, since I can
take a vec3 representing a position or normal, and construct the appropriate
vec4 in homogeneous coordinates.
2016-08-20 19:46:07 -05:00
Ben Visness
31a6bd200b Implement addition for mat4's 2016-08-20 19:30:08 -05:00
Zak Strange
ed4aef49e1 0.4 - Removed use of CRT 2016-08-20 09:13:37 -07:00
Zak Strange
95780d1fd3 Merge branch 'master' of https://github.com/ZakStrange/Handmade-Math 2016-08-19 20:30:47 -07:00
Zak Strange
80d2492d86 0.3 - Added +=,-=, *=, /= for hmm_vec2, hmm_vec3, hmm_vec4 2016-08-19 20:28:32 -07:00
Zak Strange
7b90618532 Merge pull request #14 from bvisness/option-no-inline
Add ability to disable inlining of functions
2016-08-13 13:34:27 -04:00
Ben Visness
4d21fc5388 Add ability to disable inlining of functions
Some build environments build each source file individually to .o files
and then link after the fact. With inlined functions, this tends to
just produce empty .o files, undefined symbol errors, and grumpy
programmers like me.

This change simply adds the option to disable inlining of functions so
Handmade Math can function properly as a library unto itself.
2016-08-12 23:35:22 -05:00
StrangeZak
140c1caaf2 Fixed return values for HMM_SinF and HMM_TanF 2016-07-31 12:28:09 -07:00
StrangeZak
4fc4e53a60 Fixed HMM_TanF 2016-07-31 09:05:39 -07:00