Commit Graph
510 Commits
Author SHA1 Message Date
Mateusz Pusz be1705bc4a refactor: zeroth_point_origin() renamed to default_point_origin() and implicit_zeroth_point_origin renamed to zeroth_point_origin 2023-12-22 17:29:02 +01:00
Mateusz Pusz f2abaa28bc feat: quantity_from_zero() enabled for absolute point origins 2023-12-22 16:41:14 +01:00
Mateusz Pusz a962182e13 feat: implicit point origins compatibility between different quantity specs added 2023-12-22 16:35:06 +01:00
Mateusz Pusz 641163a4c3 test: verify that the implicit point origin is properly set for the rest of the units and derived ones 2023-12-21 12:25:09 +01:00
Mateusz Pusz fe099b5ad1 feat: propagation of point origins for scaled units added 2023-12-21 12:25:09 +01:00
Mateusz Pusz 10a2e6dc0d feat: 💥 initial implementation of implicit point origins 2023-12-21 12:25:09 +01:00
Nick Thompson 267db9e2a2 Update minimum cmake version to 3.5
Currently, cmake is emitting the following warning:

```
CMake Deprecation Warning at cmake/ccache.cmake:23 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.
```

Update the CMake min version to 3.5 to unclutter the build logs and ensure users don't get broken by the deprecation.
2023-12-16 11:51:58 -08:00
Mateusz Pusz 06e7c04214 test: fma() tests refactored 2023-12-16 20:24:52 +01:00
Nick Thompson 7a270a6fd9 Floating point classification functions
Add the ability for `isnan`, `isfinite`, and `isinf` to work on dimensioned quantities.
2023-12-16 08:08:44 -08:00
Nick f32aafe0df Merge branch 'mpusz:master' into add_fma 2023-12-11 18:01:52 -08:00
Nick Thompson 51f8b47071 Add fma to math.h 2023-12-09 13:26:38 -08:00
Mateusz Pusz 40c2ecb2aa feat: equivalent point origins handling improved 2023-12-03 18:57:34 +01:00
Mateusz Pusz da8721b997 feat: users are now allowed to inherit their ow types from absolute point origins 2023-12-03 16:15:38 +01:00
Mateusz Pusz 29c83c0d84 feat: 💥 symbol_text definition simplified 2023-11-30 09:25:29 +01:00
Mateusz Pusz d195e2b3bf fix: equality for dimensions fixed to provide transitivity 2023-11-03 21:18:57 +01:00
Mateusz Pusz a0dc3885e5 fix(unit test): degree Fahrenheit unit test fixed 2023-10-18 17:21:30 +02:00
Mateusz Pusz 8e48906729 refactor: quantity_from_origin_ data member now has much less friendly name 2023-10-17 14:29:59 +02:00
Mateusz Pusz abafd1d38e refactor: numerical_value_ data member now has much less friendly name 2023-10-17 14:16:22 +02:00
Mateusz Pusz 98d07b9ed1 feat: 💥 quantity_spec and its kind should not compare equal 2023-10-17 09:45:31 +02:00
Mateusz Pusz 1230eb6d25 test: inherited dimension test added 2023-10-17 09:32:53 +02:00
Mateusz Pusz b17c354080 refactor(tests): unit_symbol_test.cpp updated with new unit_symbol() signature 2023-10-17 09:12:51 +02:00
Mateusz Pusz 556df31590 feat: equality for dimensions now will allow derived classes as well (but not from derived_dimension) 2023-10-15 17:08:19 +02:00
Mateusz Pusz b96be72457 feat: 💥 quantity_point does not provide zero() anymore 2023-10-15 09:39:18 +02:00
Mateusz Pusz c9978dd479 refactor: some internal headers moce to the _bits/external_ subdirectory 2023-10-14 11:43:18 +02:00
Mateusz Pusz e23f038173 Merge branch 'master' into unit_compose_ext 2023-10-06 23:38:04 +02:00
Mateusz Pusz 9017aab28d test: unit tests added for muliplication and divsion of a quantity by reference 2023-10-06 15:20:20 -06:00
Mateusz Pusz 0d66089853 feat: 💥 inverse() support added for dimensions, quantity_spec, units, and references (1 / s will now create quantity and not a Unit) 2023-10-06 12:53:18 -06:00
Mateusz Pusz 5a74cd66ba feat: interoperability with other libraries redesigned 2023-09-30 22:23:18 -06:00
Mateusz Pusz b2423bfded feat: quantities can now be multiplied and divided by units 2023-09-29 21:40:24 -06:00
Mateusz Pusz 833851d1cb test: tests for printing of a symbol of a dimensionless unit with the ratio = 1 2023-09-29 06:31:32 +02:00
Mateusz Pusz caf0e66cb2 test: more unit tests for unit conversions 2023-09-28 09:01:52 +02:00
Mateusz Pusz 94bd2a23ca build: got rid of old gcc hacks 2023-09-26 18:25:03 +02:00
Mateusz Pusz 7a6b629218 feat: gray and sievert now have correct associated quantity kinds 2023-09-26 15:27:43 +02:00
Mateusz Pusz bfbc1785b8 feat: isq::activity added and becquerel definition updated to benefit from it 2023-09-26 10:37:08 +02:00
Mateusz Pusz f9ffacc713 feat: inverse() math utility added
Relates to #268
2023-09-20 20:13:39 +02:00
Mateusz Pusz ff4755d5e5 feat: quantity_ref_from disallowed for rvalues 2023-09-13 20:11:59 +02:00
Mateusz Pusz 2e26eed59d feat: numerical_value_ref_in disallowed for rvalues 2023-09-13 19:59:49 +02:00
Mateusz Pusz e085beef40 feat: qp.quantity_from(PO) added 2023-09-13 11:57:22 +02:00
Mateusz Pusz 1c7928021d feat: force_in(U) support added 2023-09-13 10:18:07 +02:00
Mateusz Pusz 3b2ca4084a refactor: quantity_point::quantity_from_origin() refactored to quantity_point::quantity_ref_from(PO)
Resolves #479 and relates to #477
2023-09-13 10:09:08 +02:00
Mateusz Pusz a7711cb301 refactor: quantity::value() refactored to quantity::value_ref_in(U) 2023-09-13 09:23:59 +02:00
Mateusz Pusz c30285ff96 fix: forgot to add compare_test.cpp to CMake 2023-09-13 09:14:45 +02:00
Mateusz Pusz b7bab8c7e6 refactor: isq::speed_of_light renamed to isq::speed_of_light_in_vacuum 2023-09-13 09:14:20 +02:00
Mateusz Pusz cbcc6f4627 feat: compare.h header added with checks against zero
Resolves #487
2023-09-13 08:55:06 +02:00
Mateusz Pusz b6bc9434d0 fix: quantity.in(U) fixed to clone a reference from the source type 2023-09-04 12:27:49 +02:00
Mateusz Pusz 2c9502a2a9 test: units tests for point origin arithmetics added 2023-08-31 19:02:04 +02:00
Mateusz Pusz 2bfc282483 test: missing units tests for quantity::one() aded 2023-08-31 19:01:13 +02:00
Mateusz Pusz 5ee4c5346a test: test_tools.h file cleanup 2023-08-30 18:22:30 +02:00
Mateusz Pusz f1c2c74ab0 refactor: quantity::value() renamed to quantity::numerical_value()
According to https://jcgm.bipm.org/vim/en/1.19.html "quantity value" also contains a unit. According to https://jcgm.bipm.org/vim/en/1.20.html "numerical value" is the correct term for just a number.

Resolves #423
2023-08-30 11:30:35 +02:00
Mateusz Pusz 4705382c17 test: a few checks trigger a bug in clang so they were disabled from compilation on this compiler 2023-08-26 19:43:09 +02:00