3a6faca98f
maths: use structured assertions in imit
2016-04-19 14:49:17 +10:00
8022d459e5
maths: add samesign convenience function
2016-02-03 13:56:40 +11:00
2224131955
debug: simplify CHECK macros for constexpr safety
2016-02-03 12:04:47 +11:00
c04c56ed32
maths: make is_pow2 constexpr
2016-02-02 11:32:29 +11:00
8e2c5f1942
maths: explanatory header for sign()
2015-11-16 17:57:53 +11:00
486cefc4c6
maths: move functions inline, remove ipp
2015-11-16 13:57:51 +11:00
eb2722bfa4
maths: style
2015-11-16 13:21:38 +11:00
791f8b2bcd
maths: remove rootsquare, use std::hypot instead
2015-11-16 13:18:29 +11:00
b1bc54ac8c
maths: move remaining operations into util namespace
2015-11-16 11:44:07 +11:00
5a26793b0a
maths: reduce template verbosity
2015-11-13 18:00:15 +11:00
b6a4166c68
maths: style
2015-11-13 17:25:21 +11:00
f2bd6501e2
maths: remove const/pure attributes
...
const/pure attributes are causing inconsitencies for various functions.
it's safer to just not use them until there's a more thorough
investigation of their impact.
2015-11-13 17:18:10 +11:00
89fe57b65b
maths: move more operations into util::
2015-11-13 17:18:10 +11: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
c76e0716c4
maths: annotate with gnu::const where appropriate
2015-11-13 13:50:58 +11:00
02a42f282e
maths: use SFINAE for round_to instead of assert
2015-11-13 13:48:46 +11:00
cd58dc8cc3
maths: rename align as round_to
...
reduces confusion between pointer align, and number rounding
2015-11-13 13:48:46 +11:00
ac86ef3bd5
maths: fix hi-lo normalisation shift size
2015-10-29 18:22:46 +11:00
0369b16f73
maths: correct limit's assertion operator
2015-10-29 18:22:28 +11:00
4aeacc3a27
maths: make limit constexpr friendly
2015-10-29 10:51:43 +11:00
03efa074ab
maths: make limit constexpr
2015-10-20 16:54:15 +11:00
c2770a266b
maths: split normalise functions
2015-10-20 16:54:15 +11:00
36b4043faf
maths: add identity function
2015-10-19 17:06:52 +11:00
a342654ae1
maths: add namespaced wrappers
2015-10-06 15:21:48 +11:00
381da163e2
maths: style
2015-09-16 02:24:49 +10:00
95e5fc5834
maths: add namespaced wrapper for abs
2015-09-15 21:06:23 +10:00
3099e6be6c
maths: add kahan summation
2015-08-25 17:25:55 +10:00
0533e3caaf
maths: add gcd implementation
2015-07-13 16:30:54 +10:00
cd841acc7b
maths: style
2015-06-30 22:24:43 +10:00
eda46a9e7c
maths: ensure float types for to_{radians,degrees}
2015-06-04 14:38:12 +10:00
c052d7df4b
maths: use templated PI and E constants
2015-04-29 17:45:39 +10:00
2658b41ea1
relicence under Apache-2.0
2015-04-13 18:05:28 +10:00
7c33efda62
maths: reduce cast warnings in renormalise
2015-04-09 20:43:14 +10:00
9f6c17d6cf
maths: add renormalise function
2015-04-09 17:44:50 +10:00
93ed983a6f
maths: use __builtin_signbit to handle +- zeros
2015-03-24 02:42:42 +11:00
585a0b464c
maths: make sign query inline
...
code which needs this function tends to require a fairly simple
implementation inline for the optimiser to reach more successfully. we
tended to generate function calls to this which slowed this inner loops.
2015-03-20 01:36:15 +11:00
e69d970e22
coord/ops: add max/min vector and element
2015-03-06 17:52:25 +11:00
75d69bf9df
maths: fix the ordering of limit
2015-02-05 20:37:07 +11:00
8487f700f6
maths: add smoothstep
2015-02-05 20:37:07 +11:00
b12d0b95fc
maths: special case limit conditions of sinc
2015-02-05 20:37:07 +11:00
3e9f5efbe0
maths: add sinc functions
2015-02-04 15:44:31 +11:00
2fcc16646c
maths: templatise to_{radians,degrees}
2015-02-04 15:44:03 +11:00
ebd1087087
maths: add factorial and combination
2015-02-02 15:25:22 +11:00
af7f01efd3
maths: label maths primitives pure
2015-01-28 14:57:20 +11:00
dd098943cf
maths: remove rvalref from limit
2015-01-22 14:56:33 +11:00
0a2d163bb1
maths: seperate float and double PI
2015-01-21 23:40:13 +11:00
4260c91cd0
maths: add integer power operation
2015-01-21 23:40:13 +11:00
d3c300053b
maths: comment sections
2015-01-21 23:40:13 +11:00
79be955d28
maths: allow mixed type variadic min/max
2015-01-15 14:06:17 +11:00
f309c5dbd0
maths: add float overload of to_radians
2015-01-13 18:41:51 +11:00
a691f3b748
maths: add constexpr to min,max,to_{radian,degree}
2015-01-13 18:32:01 +11:00
5956d0421e
parameterise point, vector, region, matrix on type
2014-12-15 20:10:56 +11:00
23b0a7b146
remove annotations header
...
The annotations were never particularly robust, and weren't used in many
locations (or consistently). And we should be migrating to c++14
annotation syntax anyway. By focusing on writing them all locally we
will be a little more standards compliant, and the attributes should be
more visible.
2014-10-17 19:24:53 +11:00
84ca008305
copyright headers and date bumps
2014-09-17 18:20:28 +10:00
bb3cbb584c
maths: add log2up
2014-09-17 16:41:38 +10:00
755e0d92cb
maths: add log2
2014-09-11 15:34:59 +10:00
9fc979ee1d
maths: rename divup to align
2014-09-01 16:26:01 +10:00
2eaf2ee73c
maths: add limit function for min/max'ing
2014-08-02 21:13:51 +10:00
5e1aad2f15
maths: allow min to operate on multiple types
2014-08-02 21:13:31 +10:00
935b1fe2e9
maths: allow differing arg typs in round_up
2014-08-01 20:44:58 +10:00
4216369e86
maths: correct divisor in divup
2014-07-15 19:52:09 +10:00
5c030bf0ea
maths: exactly_equal should take two typenames
2014-07-07 15:21:17 +10:00
08f8d35799
whitespace errors
2014-07-07 15:21:17 +10:00
b26449fd5f
maths: add divide-and-round-up
2014-04-16 19:17:15 +10:00
20e8297768
Add query for decimal digits of an integer
2012-07-30 16:31:51 +10:00
983b96c958
Move is_pow2 to headers for template generation
2012-07-30 16:31:19 +10:00
83343ee7a1
Move declerations for code style
2012-05-26 18:02:38 +10:00
474a808f79
Add exactly_zero call
2012-05-08 16:39:58 +10:00
2ef2554316
Add almost_zero wrapper for almost_equal
2012-05-03 18:11:42 +10:00
f8ad4c0c04
Correct the spelling of to_degrees
2012-05-03 15:56:21 +10:00
4a745f870e
Use signbit for floating point sign<T>
2012-05-03 15:55:45 +10:00
77942e008d
Change my email to an active domain
2012-04-23 13:10:50 +10:00
fc0b978ac1
Add maths check for integer numbers on doubles
2012-04-20 18:04:40 +10:00
64dd72db85
Add support for differing types in almost_equal
2012-04-20 18:02:54 +10:00
af05331358
Move sign function to maths.hpp
2012-04-13 11:23:55 +10:00
a3d965b917
Change licencing from waif to libgim
2012-04-11 15:21:00 +10:00
16d05e9ea6
Add to/from radian helpers
2011-10-29 23:13:47 +11:00
406b70f1c3
Rename exact_equal to exactly_equal
2011-10-23 20:14:35 +11:00
d749be578a
Add an exact_equal operator to avoid warnings
2011-10-16 14:57:43 +11:00
380d51d05a
Add is_pow2, round_up
2011-08-29 14:31:22 +10:00
31796b34f6
Add pure annotation to simple maths and ntoh funcs
2011-07-16 15:53:53 +10:00
20f81a7630
Correct package name in copyright headers
...
Package is no longer waif, after its seperation from the waif
library/application. Hopefully there aren't any more dependencies...
2011-06-21 20:26:32 +10:00
745e06d1af
initial import from waif
2011-05-23 17:18:52 +10:00