unnecessary code

This commit is contained in:
BlackMATov
2020-11-26 00:28:00 +07:00
parent db848a7964
commit 163afb6c98
2 changed files with 0 additions and 16 deletions

View File

@@ -93,17 +93,6 @@ namespace vmath_hpp
namespace vmath_hpp
{
// identity
template < typename T >
constexpr mat<T, 4> identity() {
return {
{1, 0, 0, 0},
{0, 1, 0, 0},
{0, 0, 1, 0},
{0, 0, 0, 1}};
}
// translate
template < typename T >

View File

@@ -59,11 +59,6 @@ TEST_CASE("vmath/mat_ext") {
STATIC_REQUIRE(column(mat2i(), 1, {3,4}) == mat2i(1,3,0,4));
}
SECTION("identity") {
STATIC_REQUIRE(vec4f(2.f,3.f,4.f,1.f) * identity<float>() == approx4(2.f,3.f,4.f,1.f));
STATIC_REQUIRE(vec4f(2.f,3.f,4.f,1.f) * identity<float>() == approx4(2.f,3.f,4.f,1.f));
}
SECTION("translate") {
STATIC_REQUIRE(vec4f(2.f,3.f,4.f,1.f) * translate(1.f,2.f,3.f) == approx4(3.f,5.f,7.f,1.f));
STATIC_REQUIRE(vec4f(2.f,3.f,4.f,1.f) * translate(vec3f{1.f,2.f,3.f}) == approx4(3.f,5.f,7.f,1.f));