Rename as_magnitude<...>() to mag<...>()

This is easier to write and to read.
This commit is contained in:
Chip Hogg
2022-07-29 01:46:06 +00:00
parent 4912bac0c5
commit ea83af8aa9
36 changed files with 196 additions and 217 deletions
+2 -2
View File
@@ -84,7 +84,7 @@ TEST_CASE("operator<< on a quantity", "[text][ostream][fmt]")
{
SECTION("in terms of base units")
{
const length<scaled_unit<pow<6>(as_magnitude<10>()), metre>> q(123);
const length<scaled_unit<pow<6>(mag<10>()), metre>> q(123);
os << q;
SECTION("iostream") { CHECK(os.str() == "123 Mm"); }
@@ -96,7 +96,7 @@ TEST_CASE("operator<< on a quantity", "[text][ostream][fmt]")
SECTION("in terms of derived units")
{
const energy<scaled_unit<pow<-2>(as_magnitude<10>()), joule>> q(60);
const energy<scaled_unit<pow<-2>(mag<10>()), joule>> q(60);
os << q;
SECTION("iostream") { CHECK(os.str() == "60 cJ"); }