mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-04 20:54:28 +02:00
changed hectare to an alias_unit
This commit is contained in:
committed by
Mateusz Pusz
parent
6f8bddc832
commit
7b8ad8e37c
@@ -52,7 +52,7 @@ struct square_exametre : deduced_unit<square_exametre, dim_area, exametre> {};
|
||||
struct square_zettametre : deduced_unit<square_zettametre, dim_area, zettametre> {};
|
||||
struct square_yottametre : deduced_unit<square_yottametre, dim_area, yottametre> {};
|
||||
|
||||
using hectare = square_hectometre;
|
||||
struct hectare : alias_unit<square_hectometre, "ha"> {};
|
||||
|
||||
template<Unit U, Scalar Rep = double>
|
||||
using area = quantity<dim_area, U, Rep>;
|
||||
|
@@ -274,6 +274,8 @@ static_assert(10q_km * 10q_km == 100q_km2);
|
||||
static_assert(1q_m2 == 10'000q_cm2);
|
||||
static_assert(1q_ha == 10'000q_m2);
|
||||
|
||||
static_assert(hectare::symbol == "ha");
|
||||
|
||||
static_assert(detail::unit_text<dim_area, square_metre>() == basic_symbol_text("m²", "m^2"));
|
||||
|
||||
// volume
|
||||
|
Reference in New Issue
Block a user