Commit Graph

1898 Commits

Author SHA1 Message Date
4608c65c84 posix/map: start extracting pure mmap class 2016-10-02 16:18:41 +11:00
152a55ad78 Merge remote-tracking branch 'origin/master' 2016-10-02 16:13:31 +11:00
790728d3b1 posix/fd: extract file descriptor into own unit 2016-10-02 15:50:13 +11:00
26bab4db71 debug: revert DEBUG_ONLY name change
DEBUG_ONLY is visible to other projects. Changing it to have internal
scope introduces too many build failures currently.
2016-09-28 17:24:01 +10:00
66f0bbc025 extent: make area and diameter constexpr 2016-09-28 17:21:02 +10:00
657a407d0e debug: respecte NDEBUG for CHECK macros 2016-09-28 17:20:46 +10:00
fad44bd1f7 format: allow %! specifier for all types
If we allow the %! specifier for all types it greatly simplifies
handling of format strings in templated code, or code with non-trivial
typedefs.
2016-09-27 15:23:33 +10:00
b7d141322c coord/ops: add logical or, and logical and for bools 2016-09-23 13:39:13 +10:00
109d47e971 coord/ops: generalise vectors hypot function 2016-09-23 13:27:44 +10:00
70689fd449 colour: correct the component count of colour1u 2016-09-23 13:27:21 +10:00
ff86357b83 coord/ops: use full types for is_coord
rather than passing the template class we pass the fully specified
template; ie point<3,float> rather than point.

this makes it dramatically easier to use is_coord in foreign code at the
cost of making the library code slightly more verbose. we no longer have
to obtain a typedef for the root coord class somehow.
2016-09-22 16:20:32 +10:00
ede9b75bad vector: fix hypot implementation 2016-09-21 22:24:02 +10:00
7db82e4b22 coord/base: add cbegin and cend members 2016-09-21 22:23:20 +10:00
2b946510e5 coord/ops: correct last iterators for util::all and util::any 2016-09-21 22:22:52 +10:00
4544a594c3 vector: add hypot function
calculates the root of the sum of the squares. much like std::hypot, but
of arbitrary dimension.
2016-09-21 17:13:25 +10:00
d9713fe8b7 json/tree: fix signed min, unsigned max constraints
signed/unsigned casting issues prevented correct comparisons with the
min/max constraints. account for the source type's range before doing the
comparison.
2016-09-20 16:02:08 +10:00
94e60d8cd2 quaternion: add conjugation function 2016-09-15 21:41:54 +10:00
6054fd59a2 matrix: fix transposed matrix in look_at 2016-09-15 21:41:54 +10:00
e2b4e48315 test: add matrix/quaternion consistency checks 2016-09-14 17:56:27 +10:00
83484a6ea1 matrix: add look_at and euler tests 2016-09-14 17:56:27 +10:00
0e88b4b324 matrix: add to_euler function 2016-09-14 17:56:27 +10:00
b9fbcd6866 matrix: clarify look_at parameter names
rename 'centre' to 'target'; it's a lot more descriptive
2016-09-14 17:56:27 +10:00
a4a08aaa72 matrix: add free 'transposed' function 2016-09-14 17:56:27 +10:00
ff7ce2f1ef coord/ops: mod style 2016-09-14 17:42:11 +10:00
fa21e52ee0 coord/ops: add scalar cos/sin 2016-09-14 17:41:59 +10:00
ab89286d5c coord/ops: add scalar mod 2016-09-14 17:38:30 +10:00
9f3624ba3e maths: add mod wrappers 2016-09-14 17:37:49 +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
798d3aac5a io: add dup instance method to fd 2016-08-29 16:16:51 +10:00
1b118ff377 io: add static dup method to fd 2016-08-29 16:14:12 +10:00
ce2f3b821b io: delete fd's copy constructor 2016-08-29 16:13:55 +10:00
3d5aff0f30 maths: use mult rather than negation in constexpr
util::digits was triggering signed overflow warnings under gcc. By using
negative multiplication rather than explicit negation we get the same
behaviour, sans warning.
2016-08-29 14:48:07 +10:00
98c09df7f9 io: add win32 fd constructor to mapped_file 2016-08-25 12:04:55 +10:00
41a8efa200 win32/handle: make HANDLE constructor explicit 2016-08-25 12:03:48 +10:00
eb05746a21 m4/nc: bump for stabs removal 2016-08-16 17:06:37 +10:00
94506a52c8 debug: add forgotten header for win32 2016-08-16 16:22:27 +10:00
45795a1ae0 quaternion: compare test results using sum-of-differences
comparison of floating point values is inexact and there isn't an easy
way for providing an ULP delta via the TAP interface. morever, the
general expected error is too large to reliably express in ULPs.
2016-08-15 20:56:10 +10:00
7b4ece207b matrix: remove static_assert size testing
accessing the static size data via a class instance is unwiedly, but we
should have identical protections due to the template parameters
2016-08-15 20:56:10 +10:00
28cd180c44 matrix: add expanded scalar operations 2016-08-15 20:56:10 +10:00
76eb5d55b5 matrix: remove redundant determinant method 2016-08-15 20:56:10 +10:00
5ef6f936a5 matrix: add free elementwise add/sub 2016-08-15 20:56:10 +10:00
f6ceb5cdee coord/ops: add element sum overload 2016-08-15 20:56:10 +10:00
1f86925237 matrix: add elementwise sum function overload 2016-08-15 20:56:10 +10:00
2daa70bae0 matrix: add elementwise abs 2016-08-15 20:56:10 +10:00
277dfaafae maths: add integer summation path for fsum
this allows us to simplify users of fsum which may not care what
value_type they're passing for summation
2016-08-15 20:56:10 +10:00
c0601bfc7c matrix: remove dead commented code 2016-08-15 20:56:10 +10:00
54a56e5d50 matrix: reduce use of indented namespacing 2016-08-15 20:56:10 +10:00
980018656b matrix: use begin/end to define most operators 2016-08-15 20:56:10 +10:00
18915b6610 matrix: use infix_iterator for ostream operator 2016-08-15 20:56:10 +10:00
cee2b7b516 matrix: make rows/cols constexpr 2016-08-15 20:56:10 +10:00