Commit Graph

104 Commits

Author SHA1 Message Date
aee3ee29d7 region: constructors should be constexpr 2021-06-01 13:14:51 +10:00
09d83b1b8a region: remove extent only constructor 2021-06-01 13:14:31 +10:00
fdaa5e1392 assert: split CHECK_LIMIT into INCLUSIVE and INDEX
LIMIT hid an off-by-one bug when tests used end iterators. We rename the
assertion to uncover all uses of the flawed implementation, and split it
into an identical assertion, and one intended to protect against
iterator ends.
2020-09-24 08:03:41 +10:00
9d0e9a9f1d region: move rotate90 out of the header 2020-08-21 11:34:52 +10:00
578a99a6ba region: correct the 'closest' query calculation 2019-09-26 08:08:06 +10:00
4033ec7df1 region: actually act on sanity queries 2019-07-12 15:27:34 +10:00
8beada1646 debug: split debug headers into components 2019-05-17 12:26:08 +10:00
426a3a3fde region: make area and diameter constexpr 2019-03-20 16:07:42 +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
b01173d82b maths: rename limit to clamp 2018-05-03 21:43:48 +10:00
0351313c36 Merge branch 'master' into coord 2017-11-23 17:24:11 +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
6e32ad84a7 coord: use consistent naming for point coverage tests
use inclusive for tests that include all borders, and exclusive for
tests that do not accept the bottom right borders.
2017-08-24 15:56:58 +10:00
ec0cb7d2c1 region: remove scale operation
it's not immediately apparent how scale operates on both of point and
extent components. rather than complicate matters we remove them in
preference of letting the user construct it directly.
2017-08-11 15:20:48 +10:00
9abfef2769 region: remove mutating point constrain function 2017-08-11 15:19:14 +10:00
31d2e6bfd8 region: remove duplicate point/region coverage tests 2017-08-11 15:15:44 +10:00
f36a14973a region: add `encloses' test for subregions 2017-08-11 14:39:46 +10:00
72f631ab4b region: remove `expanded' function
we're trying to move away from mutating operators.

also, we do the bad thing of just renaming the non-mutating operator
given it appears no one is using the mutating operator in our code bases
anyway...
2017-08-09 17:28:53 +10:00
b6edf25cd8 region: remove the resize method
we're moving away from mutating operators so this is somewhat
out-of-place. it's not a huge functional change though as there are
enough locations where the internal representation of point/extent are
assumed that we just do it through the members.
2017-08-09 17:27:28 +10:00
fc41f0991d region: add overload of inset for vectors 2017-08-09 17:17:55 +10:00
1248f15e4f region: relax assertion to allow zero width/height
some degenerate cases create regions of zero area, but non-zero
dimensions. eg, vertical linear bezier curves.
2017-07-28 14:26:42 +10:00
d29276a427 region: add "has" point query 2017-07-25 17:10:16 +10:00
db5795c25a region: remove array constructor
the meaning of the array values weren't particularly clear. are they
point-point, point-extent, something else? also the implementation was
horribly incorrect for whatever it claimed to be doing. so we remove the
function entirely to avoid the aforementioned ambiguity.
2017-07-19 17:19:37 +10:00
dca8b174c6 build: add forgotten clang/gcc7 headers 2017-05-16 17:12:14 +10:00
353cf839d4 use nested namespace declarations 2017-01-05 15:06:49 +11:00
74f7bc2e1a region: make ostream output spacing consistent 2016-12-21 16:45:08 +11:00
2dcb315ce6 region: prefer constexpr functions over static variables 2016-12-12 17:07:53 +11:00
f6116eb63e point: prefer constexpr functions over static variables 2016-12-12 17:06:04 +11:00
249f8adfed region: forward is_valid to component point and extent 2016-10-25 19:59:06 +11:00
e5d44d0c6d coord: instantiate signed types 2016-10-25 17:50:11 +11:00
9546526c1f region: remove extent_t/point_t distinction
it's too problematic to retain signedness distinctions between base
points and region extents. just use the same types, but retain the
named typedefs for compatibility.
2016-10-25 17:50:11 +11:00
9a798446b5 build: remove unnecessary includes
discovered with include-what-you-use
2016-10-12 15:08:22 +11:00
00eca4445b debug: use less complex specialistion for validator 2016-08-10 17:36:25 +10:00
8f8896b0f6 debug: use appropriate signed literals for CHECK 2016-08-10 17:34:54 +10:00
809e7b0421 iostream: use consistent ostream format 2016-03-11 13:01:57 +11:00
7f4cf49931 iterator: use infix_iterator for coord ostream 2016-03-11 12:48:19 +11:00
424e6e8701 cast: move types/casts to cast 2015-11-17 16:19:27 +11:00
1de33ce53c debug: use new namespace 2015-10-29 10:45:42 +11:00
4cd6dcc85c region: use size_type for scaling param 2015-10-19 17:08:08 +11:00
d73e86b374 coord: avoid casting errors for coord types 2015-10-19 12:06:03 +11:00
86834281b8 coord: add 16 bit value instantiations 2015-09-22 17:24:16 +10:00
69443f2c2a region: use explict constructors for member vars 2015-09-09 18:45:23 +10:00
c3c1b9cc39 region: fix potential infinite recursion 2015-09-08 14:33:59 +10:00
2658b41ea1 relicence under Apache-2.0 2015-04-13 18:05:28 +10:00
426fc1c848 region: remove two-scalar constructor
two-scalar constructor is too similar to extent and point constructors
leading to unexpected initialisation problems.
2015-04-02 15:01:17 +11:00
1ec7761309 region: add calls to debug::sanity 2015-03-07 03:20:28 +11:00
832472c861 extent,region: instantiation for 3d types 2015-03-06 17:52:40 +11:00
439bb19679 coord: move operators out of subclasses 2015-03-06 01:09:58 +11:00
872499360f extent: derive from generic coord class 2015-03-03 19:43:09 +11:00