Rename as_magnitude<...>() to mag<...>()
This is easier to write and to read.
This commit is contained in:
1 parent
4912bac0c5
commit
ea83af8aa9
36 files changed
+196
-217
No files matched your search
@@ -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"); }
|
||||
|
||||
Reference in new issue
Block a user