mirror of
https://github.com/BlackMATov/vmath.hpp.git
synced 2025-12-14 20:31:25 +07:00
unnecessary code
This commit is contained in:
@@ -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 >
|
||||
|
||||
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user