Commit Graph
1842 Commits
Author SHA1 Message Date
Mateusz Pusz 5fc4820102 ci: -b outdated fixed 2022-08-02 15:44:40 +02:00
Mateusz Pusz 6147348b88 ci: ci-conan no longer uses conan-package-tools 2022-08-02 15:41:20 +02:00
Mateusz Pusz 9944de10f9 ci: fmt dependency checked only when UNITS_USE_LIBFMT is set 2022-08-02 15:10:21 +02:00
Mateusz Pusz 6557647ce9 ci: MSVC condition added to VS-specific branches 2022-08-02 12:57:09 +02:00
Mateusz Pusz 938a25c9a3 ci: MSVC compiler paths removed 2022-08-02 10:44:25 +02:00
Mateusz Pusz 82e808855f ci: ci-test-package-cmake.yml updated to the ci-conan.yml state 2022-08-02 09:42:31 +02:00
Mateusz Pusz db6c46ad3a ci: conanvcvars.bat call fixed 2022-08-02 09:07:59 +02:00
Mateusz Pusz a134d74ca2 ci: Downcase 'build_type' now uses a GitHub action 2022-08-02 08:56:16 +02:00
Mateusz Pusz f24f87302f ci: CMake preset name fixed in documentation script 2022-08-02 08:51:52 +02:00
Mateusz Pusz 82f018f216 ci: working-directory fixed 2022-08-02 08:39:59 +02:00
Mateusz Pusz 1c5061338f ci: GitHub actions updated with CMake presets usage 2022-08-02 08:30:14 +02:00
Mateusz Pusz 9b1c9f16f1 ci: Check CMake version 2022-08-01 18:31:03 +02:00
Mateusz Pusz 9c10b1cdbe docs: "Usage" documentation updated with CMake presets usage 2022-08-01 18:29:49 +02:00
Mateusz Pusz 804d4e1cd4 build(conan): cmake_layout support added 2022-08-01 18:29:03 +02:00
Mateusz Pusz d310bb1b8d docs: Documentation updated for the latest unknown_coherent_unit changes 2022-08-01 11:59:45 +02:00
Mateusz Pusz 0ebf85b9db fix: unknown_coherent_unit fixed 2022-08-01 11:59:00 +02:00
Mateusz Pusz bb5c02e09e fix: Quantity inversion operation fixed
Resolves #367
2022-08-01 10:03:55 +02:00
Mateusz Pusz 5bd378a835 refactor: base_units_ratio.h renamed to absolute_magnitude.h 2022-07-31 15:45:40 +02:00
Mateusz Pusz 7cd168377f build(conan): Conanfile fixed after the last wrong commit 2022-07-30 14:30:16 +02:00
Mateusz Pusz 2e410278ba Revert "build(conan): cmake_layout import added too early by an accident"
This reverts commit 5efbda75d5.
2022-07-30 14:29:17 +02:00
Mateusz Pusz c74bd08cd5 Merge branch 'master' of github.com:mpusz/units 2022-07-30 14:24:51 +02:00
Mateusz Pusz 5efbda75d5 build(conan): cmake_layout import added too early by an accident 2022-07-30 10:57:59 +02:00
Mateusz Pusz d50ed286b3 Merge pull request #381 from JohelEGP/llvm16
refactor: update hacks for LLVM 16
2022-07-30 10:49:44 +02:00
Mateusz Pusz 6608c6dfd4 Merge pull request #379 from chiphogg/chiphogg/mag_
Explicitly qualify `mag<>` that initializes `mag` member
2022-07-30 10:44:37 +02:00
Johel Ernesto Guerrero Peña e988e1d74e refactor: update hacks for LLVM 16 2022-07-29 17:17:07 -04:00
Chip Hogg f6f7f9bafb Explicitly qualify mag<> that initializes mag member
This should fix clang's complaint.
2022-07-29 14:18:33 +00:00
Mateusz Pusz 1d3f3b26e4 Merge pull request #378 from chiphogg/chiphogg/mag
Rename `as_magnitude<...>()` to `mag<...>()`
2022-07-29 08:37:04 +02: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
Mateusz Pusz 4912bac0c5 Merge pull request #374 from chiphogg/chiphogg/exp0
Remove `exp` member from `ratio`
2022-07-28 10:39:44 +02:00
Chip Hogg 0adee83866 Use mag_power to make callsites more concise 2022-07-27 14:30:38 +00:00
Mateusz Pusz e7d6b7a9b0 build(conan): Imports reordered to make pre-commit happy 2022-07-26 12:26:47 +02:00
Mateusz Pusz a1d43c2613 chore: Conan 1.X temporary files added to .gitignore 2022-07-26 11:30:38 +02:00
Mateusz Pusz 5dcfa7077e docs: Dependencies chapter updated 2022-07-26 10:02:15 +02:00
Mateusz Pusz 2405c83da1 build(conan): Switched to conan.tools.build.check_min_cppstd 2022-07-26 09:53:26 +02:00
Mateusz Pusz f6332c849f build(conan): self.info.header_only() will be removed in Conan 2.0 2022-07-26 09:38:04 +02: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
Mateusz Pusz 806ec9ba8c Merge pull request #368 from chiphogg/chiphogg/print-mag
Migrate remaining ratio template parameters to Magnitude
2022-07-19 19:10:06 +02:00
Chip HoggandJohel Ernesto Guerrero Peña fd7b4df29d Add zebi and yobi prefixes
Switching to Magnitude makes these easy.

Co-authored-by: Johel Ernesto Guerrero Peña <johelegp@gmail.com>
2022-07-07 21:02:24 +00:00
Chip Hogg e1a173a02d Migrate prefixes to Magnitude 2022-07-07 17:09:42 +00:00
Chip Hogg 92750072b0 Reimplement ratio_text() as magnitude_text()
The algorithm is exactly the same; we just get our values for
`num_value`, `den_value`, and `exp10` in different ways.

The old printing logic assumed the ratio/Magnitude was an exact rational
number.  Formerly, we couldn't even _represent_ anything else, but with
Magnitude, we can.  Thus, we guard this assumption with a
`static_assert`.  Later on, we can figure out how we want to print
irrational bases and/or rational powers.  The point of this change is to
unblock us from moving to the new infrastructure.
2022-07-07 16:44:19 +00:00
Chip Hogg e1a17ab1f0 Use variables instead of ratio members
This prepares us for a time when we won't _have_ the `ratio` members
(because we'll be using `Magnitude`).
2022-07-07 16:33:51 +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
Mateusz Pusz 3710b249f3 Merge pull request #355 from chiphogg/chiphogg/switch-to-mag
Use Magnitude instead of ratio in unit implementations
2022-06-16 19:02:22 +02:00
Chip Hogg f004854a9e Remove useful names to appease MSVC 14
Looks like another compiler bug, where it considers a formal parameter
to be "unused" if it isn't used in any `if constexpr` branch.
2022-06-15 21:44:27 +00:00
Chip Hogg 3916b29e53 Move known_first_factor specialization outside namespace 2022-06-15 21:34:45 +00:00
Chip Hogg c8ec771d69 Help factoring for eV/c 2022-06-15 21:19:39 +00:00
Chip Hogg 6d66ac566e Migrate new lumen as well 2022-06-15 21:11:50 +00:00
Chip Hogg ef9e6522ca Merge branch 'master' into chiphogg/switch-to-mag 2022-06-15 20:50:30 +00:00