Commit Graph

28 Commits

Author SHA1 Message Date
8706c39ab7 quaternion: add slerp and nlerp 2019-02-07 15:45:08 +11:00
cbf4a716ac quaternion: expand elementwise and scalar operators 2019-02-07 15:44:15 +11:00
f6056153e3 rename root namespace from util to cruft
This places, at long last, the core library code into the same namespace
as the extended library code.
2018-08-05 14:42:02 +10:00
803acc9a87 relicense under MPL-2.0 2018-08-04 15:14:06 +10:00
17816021b9 coord/ops: add std::{cos,sin} overloads for coords 2018-03-13 14:39:38 +11:00
34788756d2 build: don't use './' as an include prefix
GCC produces ODR error when including paths of the form './foo' and
'foo' in the same binary. Rather than managing duplication we just
universally pick the absolute form over the relative form.
2017-11-22 16:49:37 +11:00
0d9d6317fc quaternion: add second optimised vector rotate
The original code was supposed to be from a stackexchange derivation,
but it clearly doesnt match the link.
2016-10-18 16:45:57 +11:00
3a4b711467 quaternion: add assignment-multiply operator 2016-10-18 16:45:38 +11:00
e96ef7af32 quaternion: move out of coord infrastructure 2016-10-17 22:30:16 +11:00
b5b7ae3a9a quaternion: use consistent order for naive impl 2016-10-17 18:58:45 +11:00
df27f5f89e quaternion: add naive from_to implementation 2016-10-17 18:58:41 +11:00
1582af98e6 quaterion: orthogonalise up before use in look 2016-10-17 18:56:10 +11:00
db076ad6f4 quaternion: update look, from_to, rotate 2016-10-12 23:03:33 +11:00
9a798446b5 build: remove unnecessary includes
discovered with include-what-you-use
2016-10-12 15:08:22 +11:00
94e60d8cd2 quaternion: add conjugation function 2016-09-15 21:41:54 +10:00
c917f264c4 quaternion: fix incorrect factorisation in as_matrix
One of the terms in m[0][0] and m[1][1] was incorrectly negated from an
incomplete factorisation when I transcribed the formula.

Also reintroduces the axis-rotation tests which inadvertantly had zero
magnitudes.
2016-09-14 16:49:26 +10:00
fe625c3441 quaternion: style 2016-08-11 15:01:07 +10:00
606a9c4eb8 coord/ops: use free functions for normalisations 2016-08-11 14:58:46 +10:00
517d7ce4a2 coord/ops: use distinct trait to enable scalar ops 2016-08-11 14:58:04 +10:00
974998cc48 quaternion: update to use coord framework 2016-08-10 17:42:52 +10:00
c4daffc001 build: add forgotten includes 2016-07-28 13:39:27 +10:00
7b083df977 maths: tighten up type requirements for almost_equal
almost_equal only operates on two reals, or two integers (and even then
only on the same signedness).
2015-11-13 17:18:10 +11:00
fdc801628b quaternion: update with more operators 2015-07-13 16:30:54 +10:00
2658b41ea1 relicence under Apache-2.0 2015-04-13 18:05:28 +10:00
439bb19679 coord: move operators out of subclasses 2015-03-06 01:09:58 +11:00
3d3c1a5f2f build: instantiate templates in declared namespace 2015-01-10 19:40:32 +11:00
5956d0421e parameterise point, vector, region, matrix on type 2014-12-15 20:10:56 +11:00
e54b43fd72 Add tiny quaternion stub 2012-07-31 14:40:21 +10:00