Johel Ernesto Guerrero Peña
7cb2099af5
feat: add module mp_units
2024-01-06 08:51:00 +01:00
Mateusz Pusz
7f0e7f8ca8
refactor: 💥 SI-related trigonometric functions moved to the si subnamespace
2023-12-26 09:31:11 +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
dd84873ac9
Merge branch 'master' into add_fma
2023-12-15 13:01:38 -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
abafd1d38e
refactor: numerical_value_ data member now has much less friendly name
2023-10-17 14:16:22 +02: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
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
bbdf290009
fix: clang-17 compilation fixed
2023-09-26 19:15:57 +02:00
Mateusz Pusz
77cc08ef77
fix: min and max compilation issues resolved
2023-09-26 12:32:26 +02:00
Mateusz Pusz
2e26eed59d
feat: numerical_value_ref_in disallowed for rvalues
2023-09-13 19:59:49 +02:00
Mateusz Pusz
6d619d67ef
refactor(example): get_magnitude improved for linear algebra
2023-09-13 19:53:32 +02:00
Mateusz Pusz
75fc3a0384
style: more whitespace issues caused by rebase fixed
2023-09-13 11:56:06 +02:00
Mateusz Pusz
2b2f62d038
feat: force_numerical_value_in(U) added
2023-09-13 10:10:10 +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
507d5bc446
fix(unit test): vector<T> now properly propagates treat_as_floating_point
2023-09-10 14:17:59 +02:00
Mateusz Pusz
f46b3dad74
feat: added an option to disable space before unit symbol in the text output
...
Resolves #387
2023-09-04 11:09:40 +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
24803a96cc
feat: math trigonometric functions can now be called with integral quantities
...
Relates to #485
2023-08-29 16:05:48 +02:00
Mateusz Pusz
f29c57d367
style: formatting to make pre-commit happy
2023-08-25 23:05:36 +02:00
Mateusz Pusz
3cc653fae1
build: fmt updated to 10.1.0 to enable gcc-13 compilation
2023-08-23 20:01:23 +02:00
Mateusz Pusz
a9204e2473
refactor: number() and number_in() renamed to value() and value_in()
...
Resolves #423
2023-08-23 17:15:32 +02:00
Mateusz Pusz
ae92b49775
refactor: op[U] for quantity and quantity_point replaced with .in(U)
...
Resolves #469
2023-08-23 16:46:15 +02:00
Mateusz Pusz
5d73cd0730
feat: dimensionless quantities with a unit one are not special anymore
2023-07-10 16:53:49 +02:00
Mateusz Pusz
7b47b2fe57
fix: text output of 8-bit integers fixed ( resolves #470 )
2023-07-05 11:24:53 +02:00
Mateusz Pusz
52ce2b21f7
refactor: iostream.h renamed to ostream.h
2023-06-23 15:03:04 +02:00
Mateusz Pusz
ba1f58af76
refactor: All the macros refactored to have MP_UNITS_ prefix
2023-06-21 18:05:21 +02:00
Mateusz Pusz
3d20dfef91
refactor: unit_symbol_separator::dot renamed to half_high_dot
2023-06-18 10:28:51 +02:00
Mateusz Pusz
c8c865ec39
refactor(unit test): it seems that explicit operator* for LA usage is no longer needed
2023-06-12 12:01:34 +03:00
Mateusz Pusz
7b22155bf3
feat: linear algebra library usage re-enabled
2023-06-12 11:47:30 +03:00
Mateusz Pusz
4788aa64be
build: linear_algebra test disables as the latest version of the LA lib is broken
2023-05-26 15:56:06 +02:00
Mateusz Pusz
52bbd00ab4
style: clang-format new rules applied to the code base
2023-05-26 14:20:00 +02:00
Mateusz Pusz
561fbf7c93
merge branch master
2023-05-26 13:53:52 +02:00
Mateusz Pusz
7d9ae3ec31
refactor: mp_units subdirectory renamed to mp-units
2023-05-25 12:47:10 +02:00
Mateusz Pusz
546a8a79a9
test: fmt test fixed for radian
2023-04-21 15:03:07 +01:00
Mateusz Pusz
8da791f8ba
refactor(unit test): math tests refactored to not use removed constructor
2023-04-03 18:07:10 +02:00
Mateusz Pusz
079e640614
test: linear algebra test refactored to benefit from the latest features
2023-02-14 12:29:45 +01:00
Mateusz Pusz
6d033d72fe
fix(unit test): quantity construction switched to a new syntax in unit tests
2023-02-13 19:05:58 +01:00
Mateusz Pusz
9436229ed2
refactor: the rest of the code refactored for new quantity construction way
2023-02-10 17:20:48 -08:00
Mateusz Pusz
83aee04da0
refactor: quantity_io.h renamed to iostream.h
2023-02-03 16:57:48 +01:00
Mateusz Pusz
b4f47c3fef
feat: value_cast support added
...
Resolves #239 and #120
2023-02-03 11:08:13 +01:00
Mateusz Pusz
9a7a55b873
test: test's text output fixed after unit ordering change
2023-01-05 10:39:23 +01:00
Mateusz Pusz
163295842e
test: initial version of linear_algebra_test added
2023-01-04 19:06:25 +01:00
Mateusz Pusz
2cf736a1e6
feat: preventing possible future units crash when using namespace std;
...
Resolves #317
2022-12-29 20:18:48 +01:00
Mateusz Pusz
6b72dd39c1
refactor: headers with system definitions moved to _systems_ subdirectory
2022-12-29 19:27:54 +01:00
Mateusz Pusz
97da55edfa
refactor: the rest of the systems refactored for V2
2022-12-29 18:59:10 +01:00