mirror of
https://github.com/BlackMATov/vmath.hpp.git
synced 2025-12-13 20:17:58 +07:00
rename units to new style
This commit is contained in:
18
README.md
18
README.md
@@ -1730,17 +1730,17 @@ template < typename T > inline vec<T, 4> unit4_y;
|
||||
template < typename T > inline vec<T, 4> unit4_z;
|
||||
template < typename T > inline vec<T, 4> unit4_w;
|
||||
|
||||
template < typename T > inline mat<T, 2> zero2x2;
|
||||
template < typename T > inline mat<T, 3> zero3x3;
|
||||
template < typename T > inline mat<T, 4> zero4x4;
|
||||
template < typename T > inline mat<T, 2> mzero2;
|
||||
template < typename T > inline mat<T, 3> mzero3;
|
||||
template < typename T > inline mat<T, 4> mzero4;
|
||||
|
||||
template < typename T > inline mat<T, 2> unit2x2;
|
||||
template < typename T > inline mat<T, 3> unit3x3;
|
||||
template < typename T > inline mat<T, 4> unit4x4;
|
||||
template < typename T > inline mat<T, 2> munit2;
|
||||
template < typename T > inline mat<T, 3> munit3;
|
||||
template < typename T > inline mat<T, 4> munit4;
|
||||
|
||||
template < typename T > inline mat<T, 2> identity2x2;
|
||||
template < typename T > inline mat<T, 3> identity3x3;
|
||||
template < typename T > inline mat<T, 4> identity4x4;
|
||||
template < typename T > inline mat<T, 2> midentity2;
|
||||
template < typename T > inline mat<T, 3> midentity3;
|
||||
template < typename T > inline mat<T, 4> midentity4;
|
||||
|
||||
template < typename T > inline qua<T> qzero;
|
||||
template < typename T > inline qua<T> qidentity;
|
||||
|
||||
@@ -39,17 +39,17 @@ namespace vmath_hpp
|
||||
template < typename T > inline constexpr vec<T, 4> unit4_z{T{0}, T{0}, T{1}, T{0}};
|
||||
template < typename T > inline constexpr vec<T, 4> unit4_w{T{0}, T{0}, T{0}, T{1}};
|
||||
|
||||
template < typename T > inline constexpr mat<T, 2> zero2x2{zero_init};
|
||||
template < typename T > inline constexpr mat<T, 3> zero3x3{zero_init};
|
||||
template < typename T > inline constexpr mat<T, 4> zero4x4{zero_init};
|
||||
template < typename T > inline constexpr mat<T, 2> mzero2{zero_init};
|
||||
template < typename T > inline constexpr mat<T, 3> mzero3{zero_init};
|
||||
template < typename T > inline constexpr mat<T, 4> mzero4{zero_init};
|
||||
|
||||
template < typename T > inline constexpr mat<T, 2> unit2x2{unit_init};
|
||||
template < typename T > inline constexpr mat<T, 3> unit3x3{unit_init};
|
||||
template < typename T > inline constexpr mat<T, 4> unit4x4{unit_init};
|
||||
template < typename T > inline constexpr mat<T, 2> munit2{unit_init};
|
||||
template < typename T > inline constexpr mat<T, 3> munit3{unit_init};
|
||||
template < typename T > inline constexpr mat<T, 4> munit4{unit_init};
|
||||
|
||||
template < typename T > inline constexpr mat<T, 2> identity2x2{identity_init};
|
||||
template < typename T > inline constexpr mat<T, 3> identity3x3{identity_init};
|
||||
template < typename T > inline constexpr mat<T, 4> identity4x4{identity_init};
|
||||
template < typename T > inline constexpr mat<T, 2> midentity2{identity_init};
|
||||
template < typename T > inline constexpr mat<T, 3> midentity3{identity_init};
|
||||
template < typename T > inline constexpr mat<T, 4> midentity4{identity_init};
|
||||
|
||||
template < typename T > inline constexpr qua<T> qzero{zero_init};
|
||||
template < typename T > inline constexpr qua<T> qidentity{identity_init};
|
||||
|
||||
@@ -41,17 +41,17 @@ TEST_CASE("vmath/ext/units") {
|
||||
STATIC_CHECK(unit4_z<int> == ivec4(0,0,1,0));
|
||||
STATIC_CHECK(unit4_w<int> == ivec4(0,0,0,1));
|
||||
|
||||
STATIC_CHECK(zero2x2<int> == imat2(0,0,0,0));
|
||||
STATIC_CHECK(zero3x3<int> == imat3(0,0,0,0,0,0,0,0,0));
|
||||
STATIC_CHECK(zero4x4<int> == imat4(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0));
|
||||
STATIC_CHECK(mzero2<int> == imat2(0,0,0,0));
|
||||
STATIC_CHECK(mzero3<int> == imat3(0,0,0,0,0,0,0,0,0));
|
||||
STATIC_CHECK(mzero4<int> == imat4(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0));
|
||||
|
||||
STATIC_CHECK(unit2x2<int> == imat2(1,1,1,1));
|
||||
STATIC_CHECK(unit3x3<int> == imat3(1,1,1,1,1,1,1,1,1));
|
||||
STATIC_CHECK(unit4x4<int> == imat4(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1));
|
||||
STATIC_CHECK(munit2<int> == imat2(1,1,1,1));
|
||||
STATIC_CHECK(munit3<int> == imat3(1,1,1,1,1,1,1,1,1));
|
||||
STATIC_CHECK(munit4<int> == imat4(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1));
|
||||
|
||||
STATIC_CHECK(identity2x2<int> == imat2());
|
||||
STATIC_CHECK(identity3x3<int> == imat3());
|
||||
STATIC_CHECK(identity4x4<int> == imat4());
|
||||
STATIC_CHECK(midentity2<int> == imat2());
|
||||
STATIC_CHECK(midentity3<int> == imat3());
|
||||
STATIC_CHECK(midentity4<int> == imat4());
|
||||
|
||||
STATIC_CHECK(qzero<float> == fqua(zero_init));
|
||||
STATIC_CHECK(qidentity<float> == fqua(identity_init));
|
||||
|
||||
@@ -942,42 +942,42 @@ TEST_CASE("vmath/fix_units") {
|
||||
STATIC_CHECK(unit4_w<fix<float>> == fix4f{fix(0.f),fix(0.f),fix(0.f),fix(1.f)});
|
||||
}
|
||||
{
|
||||
STATIC_CHECK(zero2x2<fix<float>> == fix2x2f{
|
||||
STATIC_CHECK(mzero2<fix<float>> == fix2x2f{
|
||||
fix(0.f),fix(0.f),
|
||||
fix(0.f),fix(0.f)});
|
||||
STATIC_CHECK(zero3x3<fix<float>> == fix3x3f{
|
||||
STATIC_CHECK(mzero3<fix<float>> == fix3x3f{
|
||||
fix(0.f),fix(0.f),fix(0.f),
|
||||
fix(0.f),fix(0.f),fix(0.f),
|
||||
fix(0.f),fix(0.f),fix(0.f)});
|
||||
STATIC_CHECK(zero4x4<fix<float>> == fix4x4f{
|
||||
STATIC_CHECK(mzero4<fix<float>> == fix4x4f{
|
||||
fix(0.f),fix(0.f),fix(0.f),fix(0.f),
|
||||
fix(0.f),fix(0.f),fix(0.f),fix(0.f),
|
||||
fix(0.f),fix(0.f),fix(0.f),fix(0.f),
|
||||
fix(0.f),fix(0.f),fix(0.f),fix(0.f)});
|
||||
}
|
||||
{
|
||||
STATIC_CHECK(unit2x2<fix<float>> == fix2x2f{
|
||||
STATIC_CHECK(munit2<fix<float>> == fix2x2f{
|
||||
fix(1.f),fix(1.f),
|
||||
fix(1.f),fix(1.f)});
|
||||
STATIC_CHECK(unit3x3<fix<float>> == fix3x3f{
|
||||
STATIC_CHECK(munit3<fix<float>> == fix3x3f{
|
||||
fix(1.f),fix(1.f),fix(1.f),
|
||||
fix(1.f),fix(1.f),fix(1.f),
|
||||
fix(1.f),fix(1.f),fix(1.f)});
|
||||
STATIC_CHECK(unit4x4<fix<float>> == fix4x4f{
|
||||
STATIC_CHECK(munit4<fix<float>> == fix4x4f{
|
||||
fix(1.f),fix(1.f),fix(1.f),fix(1.f),
|
||||
fix(1.f),fix(1.f),fix(1.f),fix(1.f),
|
||||
fix(1.f),fix(1.f),fix(1.f),fix(1.f),
|
||||
fix(1.f),fix(1.f),fix(1.f),fix(1.f)});
|
||||
}
|
||||
{
|
||||
STATIC_CHECK(identity2x2<fix<float>> == fix2x2f{
|
||||
STATIC_CHECK(midentity2<fix<float>> == fix2x2f{
|
||||
fix(1.f),fix(0.f),
|
||||
fix(0.f),fix(1.f)});
|
||||
STATIC_CHECK(identity3x3<fix<float>> == fix3x3f{
|
||||
STATIC_CHECK(midentity3<fix<float>> == fix3x3f{
|
||||
fix(1.f),fix(0.f),fix(0.f),
|
||||
fix(0.f),fix(1.f),fix(0.f),
|
||||
fix(0.f),fix(0.f),fix(1.f)});
|
||||
STATIC_CHECK(identity4x4<fix<float>> == fix4x4f{
|
||||
STATIC_CHECK(midentity4<fix<float>> == fix4x4f{
|
||||
fix(1.f),fix(0.f),fix(0.f),fix(0.f),
|
||||
fix(0.f),fix(1.f),fix(0.f),fix(0.f),
|
||||
fix(0.f),fix(0.f),fix(1.f),fix(0.f),
|
||||
|
||||
Reference in New Issue
Block a user