Mateusz Pusz
7ce8d695b1
test: std::complex-based quantities tests added
2024-09-17 12:48:13 -06:00
Yves Delley
3e502fb795
increase tolerance for certain math tests to two epsilon
2024-09-16 20:34:12 +02:00
Mateusz Pusz
0670fbdd9f
feat: value_cast<Representation, Unit>() complementary conversion function added
2024-09-13 21:38:59 +02:00
Mateusz Pusz
e42e568f44
fix: conversion operator to std::chrono types fixed
...
Resolves #609
2024-09-09 14:37:22 +02:00
Mateusz Pusz
3d39472f46
test: unit tests for creating a quantity from a volatile variable
2024-09-06 18:07:33 +02:00
Mateusz Pusz
1570bda905
fix: quantity scaling between different prefixes improved
...
Resolves #608
2024-09-06 12:28:11 +02:00
Mateusz Pusz
45013f6752
fix: inline restored for non-template constexpr global variables
2024-09-05 10:06:43 +02:00
Mateusz Pusz
2e840cfdb4
refactor: Repetitive inline constexpr removed as no longer needed
...
Not needed anymore as stated in cplusplus/draft#4601
2024-09-05 08:43:36 +02:00
Mateusz Pusz
77625d63cb
feat: 💥 unit_can_be_prefixed removed - from now on all named units can be prefixed
...
Resolves #604
2024-08-22 08:06:00 +02:00
Chip Hogg
f088d544b3
Fix known errors
2024-07-29 20:43:06 -04:00
Chip Hogg
3a6fac9858
Move tests to runtime
2024-07-24 20:04:15 -04:00
Chip Hogg
f6696e8f68
Fix formatting
2024-07-24 19:48:05 -04:00
Chip Hogg
7e894788d7
Compute values for rational magnitude powers
...
Since this will only ever be done at compile time (as guaranteed by
using `consteval`), we can afford to prioritize precision over speed.
To compute an Nth root, we simply do a binary search over representable
floating point numbers, looking for the number whose Nth power most
closely matches the original number.
Fixes #494 . We have included a test case reproducing the original
problem exactly. All tests use "within 4 ULPs" as the criterion, which
is (I believe) equivalent to the googletest `EXPECT_DOUBLE_EQ`
criterion.
2024-07-24 10:31:44 -04:00
Mateusz Pusz
b870b85c25
feat: import std; support added
...
Resolves #595
2024-07-16 17:36:00 +02:00
Mateusz Pusz
551ed9e094
test: conversion to chrono unit tests added
2024-07-16 12:13:29 +02:00
Mateusz Pusz
c57142c18a
fix: common_type_t with std::chrono::seconds unit test removed
2024-07-14 22:22:39 +02:00
Mateusz Pusz
d84a2beae5
fix: common_type_t unit tests fixed
2024-07-14 22:12:25 +02:00
Mateusz Pusz
fcc16ae282
feat: convertibility of a quantity with a unit one with the raw value added
...
Resolves #553
2024-07-14 18:31:11 +02:00
Mateusz Pusz
73f7901329
build: duplicated cmake_minimum_required commands removed
...
Resolves #592
2024-07-14 18:04:05 +02:00
Mateusz Pusz
f66222fb87
fix: _angular impulse_ unit symbol formatting unit test fixed
2024-07-12 19:48:01 +02:00
Mateusz Pusz
0653a2dbf7
fix: non-portable unit test removed
2024-07-12 18:46:26 +02:00
Mateusz Pusz
d341c166e1
fix: types ordering in one of the unit tests fixed
2024-07-12 18:31:54 +02:00
Mateusz Pusz
f73f924b80
refactor: small cleanup of unit_test.cpp
2024-07-12 17:49:09 +02:00
Mateusz Pusz
adbc77432e
feat: all tags in the expression templates are now ordered by the type names
...
Resolves #499
2024-07-12 17:48:38 +02:00
Mateusz Pusz
0010d868a7
feat: tag types-related operators are now hidden friends as well
...
Resolves #591
2024-07-12 16:01:03 +02:00
Mateusz Pusz
2cff579650
feat: representation type template parameter added to value convertion functions
...
Resolves #588
2024-07-04 22:05:40 +01:00
Mateusz Pusz
1365d62293
refactor: degree Celsius and Fahrenheit symbols text now use Unicode codepoints
2024-07-02 11:43:53 +01:00
Mateusz Pusz
e41078b889
fix: MP_UNITS_API_NO_CRTP handling fixed
2024-07-02 11:07:49 +01:00
Mateusz Pusz
ba8681f90b
feat: 💥 delta and absolute construction helpers
2024-06-30 12:03:24 +02:00
Mateusz Pusz
90d8fda327
feat: qp1.quantity_from(qp2) added
2024-06-25 14:07:08 -05:00
Mateusz Pusz
4b46be7604
refactor: reference specifiers are now variable templates
2024-06-20 09:20:33 +02:00
Mateusz Pusz
b38b23ece2
refactor: relative() renamed to delta()
2024-06-20 07:31:22 +02:00
Mateusz Pusz
dfac87c631
feat: multiply syntax support to create quantity_point
2024-06-19 21:11:16 +02:00
Mateusz Pusz
d03482fa1b
feat: absolute and relative reference modifiers support added
2024-06-19 21:10:16 +02:00
Mateusz Pusz
b113f6ad0e
Merge branch 'master' into feature/more-value-casts
2024-06-14 21:44:19 +09:00
Mateusz Pusz
f49b4c6f5f
refactor: compile-time optimizations reverted
2024-06-14 13:37:56 +02:00
Mateusz Pusz
05fc1e29c8
refactor: 💥 from now on point origins must be marked final + absolute_point_origin does not use CRTP anymore
2024-06-13 19:24:40 +02:00
Mateusz Pusz
5f67523a8a
feat: 💥 from now on quantity specifications have to be marked as final
2024-06-13 12:05:16 +02:00
Mateusz Pusz
6aa848a456
feat: 💥 from now on dimnensions have to be marked as final
2024-06-12 14:17:32 +02:00
Mateusz Pusz
0fbe0bb5e0
style: clang-format
2024-06-10 22:13:37 +02:00
Mateusz Pusz
e90cffcbda
refactor: text formatting library header files are no longer included in compat_macros.h
2024-06-10 22:04:41 +02:00
Mateusz Pusz
e38c7c4460
refactor: magnitudes support refactored to improve compile-times
2024-06-06 20:58:15 +02:00
Mateusz Pusz
3c97f2e611
style: clang-format
2024-06-06 14:07:29 +02:00
Mateusz Pusz
c69bd140b2
refactor: all units made final
2024-06-06 13:18:45 +02:00
Mateusz Pusz
4aea85656b
refactor: units no longer inherit from each other
2024-06-06 13:16:13 +02:00
Mateusz Pusz
fb77585593
refactor: system's units do not inherit from one another anymore
...
Resolves #512
2024-06-05 08:16:02 +02:00
Yves Delley
7589ba6ce6
Merge branch 'master' into feature/more-value-casts
2024-06-03 20:22:23 +02:00
Yves Delley
b6df881134
added more testing of conversion accuracy when using integral types
2024-06-02 11:09:46 +02:00
Yves Delley
4b809ec96c
Merge branch 'master' into feature/more-value-casts
2024-06-02 08:03:30 +02:00
Mateusz Pusz
2adc9344ea
refactor: some TODO comment addressed or removed
2024-06-01 13:36:22 +02:00