mirror of
https://github.com/BlackMATov/vmath.hpp.git
synced 2025-12-15 04:35:25 +07:00
remove operator / between matrices
This commit is contained in:
@@ -326,11 +326,6 @@ namespace vmath_hpp
|
||||
return map_join([x](const vec<T, Size>& y){ return x / y; }, ys);
|
||||
}
|
||||
|
||||
template < typename T, std::size_t Size >
|
||||
[[nodiscard]] constexpr mat<T, Size> operator/(const mat<T, Size>& xs, const mat<T, Size>& ys) {
|
||||
return map_join([](const vec<T, Size>& x, const vec<T, Size>& y){ return x / y; }, xs, ys);
|
||||
}
|
||||
|
||||
// operator/=
|
||||
|
||||
template < typename T, std::size_t Size >
|
||||
@@ -338,11 +333,6 @@ namespace vmath_hpp
|
||||
return (xs = (xs / y));
|
||||
}
|
||||
|
||||
template < typename T, std::size_t Size >
|
||||
constexpr mat<T, Size>& operator/=(mat<T, Size>& xs, const mat<T, Size>& ys) {
|
||||
return (xs = (xs / ys));
|
||||
}
|
||||
|
||||
// operator&
|
||||
|
||||
template < typename T, std::size_t Size >
|
||||
|
||||
@@ -84,7 +84,6 @@ TEST_CASE("vmath/mat_fun") {
|
||||
|
||||
STATIC_REQUIRE(int2x2(1,2,3,4) + int2x2(5,6,7,8) == int2x2(6,8,10,12));
|
||||
STATIC_REQUIRE(int2x2(1,2,3,4) - int2x2(5,6,7,8) == int2x2(-4,-4,-4,-4));
|
||||
STATIC_REQUIRE(int2x2(5,6,7,8) / int2x2(1,2,3,4) == int2x2(5,3,2,2));
|
||||
|
||||
STATIC_REQUIRE(int2x2() * int2x2() == int2x2());
|
||||
STATIC_REQUIRE(int3x3() * int3x3() == int3x3());
|
||||
@@ -118,14 +117,6 @@ TEST_CASE("vmath/mat_fun") {
|
||||
REQUIRE(&v == &(v *= 3));
|
||||
REQUIRE(v == int2x2{3,6,9,12});
|
||||
}
|
||||
{
|
||||
int2x2 v{6,18,36,60};
|
||||
REQUIRE(&v == &(v /= 2));
|
||||
REQUIRE(v == int2x2{3,9,18,30});
|
||||
REQUIRE(&v == &(v /= int2x2{3,4,3,10}));
|
||||
REQUIRE(v == int2x2{1,2,6,3});
|
||||
}
|
||||
|
||||
{
|
||||
int4 v{0, 0, 0, 1};
|
||||
REQUIRE(&v == &(v *= translate(int3{1,2,3})));
|
||||
|
||||
Reference in New Issue
Block a user