Commit Graph
465 Commits
Author SHA1 Message Date
Mateusz Pusz d0eceefe80 refactor: dead ratio code removed 2022-09-06 23:49:16 +02:00
Mateusz Pusz abc429a71a refactor: rotation angle unit renamed to revolution 2022-09-05 12:12:12 +02:00
Mateusz Pusz a39a49c147 test: VS2019 compilation fixed 2022-09-02 10:21:58 +02:00
Mateusz Pusz 396d39c35b test: AlmostEqualsMatcher compilation fixed 2022-09-01 17:18:02 +02:00
Mateusz Pusz a95cb53f73 test: unit tests for trigonometric functions added 2022-09-01 16:25:33 +02:00
Mateusz Pusz 707b39f0c4 build: catch2 updated to 3.1.0 2022-09-01 16:19:51 +02:00
Mateusz Pusz 1096d8d8ba fix: luminous flux support fixed 2022-09-01 12:18:18 +02:00
Mateusz Pusz e40a5d631c feat: solid angle support added 2022-09-01 12:16:47 +02:00
Mateusz Pusz a92a315bda feat: angular acceleration support added 2022-09-01 12:05:20 +02:00
Mateusz Pusz 1cb9d35d66 fix: radian_per_second unit symbol fixed 2022-09-01 12:02:45 +02:00
Mateusz Pusz 7719776711 feat: gradian support added 2022-09-01 10:48:34 +02:00
Mateusz Pusz c1d23b41c1 refactor: pi-based magnitude renamed to mag_pi 2022-09-01 10:47:36 +02:00
Mateusz Pusz 74f442d316 refactor: quantity_ratio removed as it is no longer used by the framework 2022-08-31 21:23:01 +02:00
Mateusz Pusz 8b534c8d8b feat: degrees and rotations support added
Resolves #370
2022-08-31 12:57:24 +02:00
Mateusz Pusz 1a29726d34 fix: math_test compile-time checks for floor, ceil, and round fixed
Relates to #311
2022-08-31 10:53:20 +02:00
Chip Hogg df290a74f0 Remove shadowing declaration of pi 2022-08-11 15:56:10 +00:00
Mateusz Pusz 1957e4424c docs: TODO comments cleanup in mixed system unit test files 2022-08-03 17:09:15 +02:00
Mateusz Pusz a1e1b70b92 test: Unit tests for 3-argument hypot added 2022-08-03 13:35:18 +02:00
Mateusz Pusz 4c8b3ce290 test: Commented out ceil unit test enabled as it works correctly now 2022-08-03 13:12:24 +02:00
Mateusz Pusz b252da0fe1 test: hypot unit tests added 2022-08-03 13:10:59 +02:00
Mateusz Pusz 0ebf85b9db fix: unknown_coherent_unit fixed 2022-08-01 11:59:00 +02:00
Johel Ernesto Guerrero Peña e988e1d74e refactor: update hacks for LLVM 16 2022-07-29 17:17:07 -04:00
Chip Hogg ea83af8aa9 Rename as_magnitude<...>() to mag<...>()
This is easier to write and to read.
2022-07-29 01:46:06 +00:00
Chip Hogg 7e591115fa Remove ratio's numerator() and denominator()
These have now become trivial.
2022-07-20 00:52:37 +00:00
Chip Hogg 7fd6913b73 Replace exp with 0 everywhere, and remove it
This lets us remove a ton of special-casing throughout the codebase, and
just generally makes things a lot simpler.

We also remove the ability to take rational powers of `ratio`, including
`sqrt` and `cbrt` helpers, because these are intrinsically ill-defined.

Fixes #369.
2022-07-20 00:52:37 +00:00
Chip Hogg 6a9dcb30de Migrate explicit-exp inputs 2022-07-20 00:52:36 +00:00
Chip Hogg 407a13c48f Add extract_power_of_10(Magnitude) utility
This will help with pretty-printing magnitudes by extracting a
reasonable power of 10.
2022-07-07 16:10:34 +00:00
Chip Hogg ef9e6522ca Merge branch 'master' into chiphogg/switch-to-mag 2022-06-15 20:50:30 +00:00
Mateusz Pusz 9a6d6f9d2a fix: MSVC conversion issues fixed 2022-06-09 13:50:01 +02:00
Mateusz Pusz 46b3781743 Revert "refactor: 💥 ! " ⋅ " replaced with "⋅" in derived unit symbols"
This reverts commit db09a065ab.
2022-05-24 14:20:17 +02:00
Mateusz Pusz 38fb9911a9 refactor: 💥 ! " ⋅ " replaced with "⋅" in derived unit symbols 2022-05-24 12:56:14 +02:00
Mateusz Pusz db09a065ab refactor: 💥 ! " ⋅ " replaced with "⋅" in derived unit symbols 2022-05-24 12:48:07 +02:00
Mateusz Pusz 768f400cc3 test: quantity CTAD tests enabled only for the newest compilers 2022-05-23 09:56:45 +02:00
Mateusz Pusz 4498adce7c test: test for new quantity CTAD guide added 2022-05-22 19:49:10 +02:00
Mateusz Pusz 13f03bfe70 feat: luminous_flux support added 2022-05-13 14:31:13 +02:00
Chip Hogg 59fa420272 Fix remaining builds/tests 2022-05-12 16:52:05 +00:00
Chip Hogg 5fb468697b Merge branch 'master' into chiphogg/switch-to-mag 2022-05-12 16:12:01 +00:00
Mateusz Pusz 5300caf17b refactor: 💥 ! derived_deduced_unit renamed to derived_scaled_unit
Naming is hard ;-)
2022-05-11 12:34:52 +02:00
Mateusz Pusz 32b36fb670 refactor: 💥 ! PrefixFamily support removed
It doesn't have much sense to restrict prefixes usage for most units and in many places we were wrong to do so already.
2022-05-11 11:59:33 +02:00
Mateusz Pusz 0522bae972 refactor: 💥 ! unit renamed to derived_unit 2022-05-11 11:40:19 +02:00
Mateusz Pusz f5d21a0711 refactor: 💥 ! derived_unit renamed to derived_deduced_unit 2022-05-11 11:23:18 +02:00
Mateusz Pusz 4c60447a28 Merge branch 'master' into downcast_mode_off 2022-05-09 19:12:02 +02:00
Mateusz Pusz ffa0f321f9 fix: shadowing compilation errors on MSVC fixed 2022-05-06 10:00:39 +02:00
Mateusz Pusz 4361cb874e fix: hectare definition fixed to be a prefixed version of are + other units
Relates to #359
2022-04-27 19:32:21 +02:00
Mateusz Pusz 56cee31a67 fix: si::hep::dim_momentum duplicated definition fixed 2022-04-24 19:52:07 +02:00
Mateusz Pusz a0c6252567 refactor: mi(naut) renamed to nmi
Relates to #357
2022-04-19 18:47:48 +02:00
Chip Hogg 2b37bc7b3e Address review feedback 2022-04-19 15:42:43 +00:00
Chip Hogg 78bcb3b019 Remove troublesome ::ratio members
For some reason, MSVC seems to want to instantiate these, even though
nobody ever asks for them (as evidenced by the fact that the builds
passed on other architectures).
2022-04-12 00:35:17 +00:00
Chip Hogg 5e365f1905 Delete obsolete test case 2022-04-11 15:16:16 +00:00
Chip Hogg d19b2803ce Migrate units from ratio to Magnitude
This commit is huge, but hopefully the cognitive load is not too bad.
The bulk of this commit is just some fairly mechanical updates from
`ratio` to `Magnitude`.  Other things to call out:

- `UnitRatio` goes away.  We don't need this concept, because Magnitude
  can't even _represent_ anything that doesn't satisfy it.

- I commented out some formatting test cases where the precise
  expression changes, but the number is completely equivalent.  We will
  need to decide how we want to handle Magnitude formatting as a
  separate, follow-on task.  But at least Magnitude gives us all the
  tools we'll need to do so!
2022-04-11 15:16:16 +00:00