forked from mpusz/mp-units
refactor: 💥 common_XXX() functions renamed to get_common_XXX()
This is needed to release a name for `common_unit` type that is coming soon.
This commit is contained in:
@@ -783,35 +783,35 @@ static_assert((position_vector / time).character == quantity_character::vector);
|
||||
static_assert((position_vector / position_vector * time).character == quantity_character::scalar);
|
||||
static_assert((velocity / acceleration).character == quantity_character::scalar);
|
||||
|
||||
// common_quantity_spec
|
||||
static_assert(common_quantity_spec(length, length) == length);
|
||||
static_assert(common_quantity_spec(kind_of<length>, kind_of<length>) == kind_of<length>);
|
||||
static_assert(common_quantity_spec(kind_of<length>, length) == length);
|
||||
static_assert(common_quantity_spec(length, kind_of<length>) == length);
|
||||
static_assert(common_quantity_spec(width, kind_of<length>) == width);
|
||||
static_assert(common_quantity_spec(kind_of<length>, width) == width);
|
||||
// get_common_quantity_spec
|
||||
static_assert(get_common_quantity_spec(length, length) == length);
|
||||
static_assert(get_common_quantity_spec(kind_of<length>, kind_of<length>) == kind_of<length>);
|
||||
static_assert(get_common_quantity_spec(kind_of<length>, length) == length);
|
||||
static_assert(get_common_quantity_spec(length, kind_of<length>) == length);
|
||||
static_assert(get_common_quantity_spec(width, kind_of<length>) == width);
|
||||
static_assert(get_common_quantity_spec(kind_of<length>, width) == width);
|
||||
|
||||
static_assert(common_quantity_spec(width, height) == length);
|
||||
static_assert(common_quantity_spec(distance, path_length) == path_length);
|
||||
static_assert(common_quantity_spec(potential_energy, kinetic_energy) == mechanical_energy);
|
||||
static_assert(get_common_quantity_spec(width, height) == length);
|
||||
static_assert(get_common_quantity_spec(distance, path_length) == path_length);
|
||||
static_assert(get_common_quantity_spec(potential_energy, kinetic_energy) == mechanical_energy);
|
||||
|
||||
static_assert(common_quantity_spec(length / time, length / time) == length / time);
|
||||
static_assert(common_quantity_spec(length / time, inverse(time / length)) == length / time);
|
||||
static_assert(get_common_quantity_spec(length / time, length / time) == length / time);
|
||||
static_assert(get_common_quantity_spec(length / time, inverse(time / length)) == length / time);
|
||||
|
||||
static_assert(common_quantity_spec(speed, length / time) == speed);
|
||||
static_assert(common_quantity_spec(length / time, speed) == speed);
|
||||
static_assert(common_quantity_spec(area, length* length) == area);
|
||||
static_assert(common_quantity_spec(length * length, area) == area);
|
||||
static_assert(common_quantity_spec(kinetic_energy, mass* pow<2>(length) / pow<2>(time)) == kinetic_energy);
|
||||
static_assert(common_quantity_spec(mass * pow<2>(length) / pow<2>(time), kinetic_energy) == kinetic_energy);
|
||||
static_assert(common_quantity_spec(gravitational_potential_energy, mass* acceleration_of_free_fall* height) ==
|
||||
static_assert(get_common_quantity_spec(speed, length / time) == speed);
|
||||
static_assert(get_common_quantity_spec(length / time, speed) == speed);
|
||||
static_assert(get_common_quantity_spec(area, length* length) == area);
|
||||
static_assert(get_common_quantity_spec(length * length, area) == area);
|
||||
static_assert(get_common_quantity_spec(kinetic_energy, mass* pow<2>(length) / pow<2>(time)) == kinetic_energy);
|
||||
static_assert(get_common_quantity_spec(mass * pow<2>(length) / pow<2>(time), kinetic_energy) == kinetic_energy);
|
||||
static_assert(get_common_quantity_spec(gravitational_potential_energy, mass* acceleration_of_free_fall* height) ==
|
||||
gravitational_potential_energy);
|
||||
static_assert(common_quantity_spec(mass * acceleration_of_free_fall * height, gravitational_potential_energy) ==
|
||||
static_assert(get_common_quantity_spec(mass * acceleration_of_free_fall * height, gravitational_potential_energy) ==
|
||||
gravitational_potential_energy);
|
||||
|
||||
static_assert(common_quantity_spec(gravitational_potential_energy, mass* acceleration* length) ==
|
||||
static_assert(get_common_quantity_spec(gravitational_potential_energy, mass* acceleration* length) ==
|
||||
mass * acceleration * length);
|
||||
static_assert(common_quantity_spec(mass * acceleration * length, gravitational_potential_energy) ==
|
||||
static_assert(get_common_quantity_spec(mass * acceleration * length, gravitational_potential_energy) ==
|
||||
mass * acceleration * length);
|
||||
|
||||
template<auto T1, auto T2>
|
||||
|
||||
Reference in New Issue
Block a user