mirror of
https://github.com/BlackMATov/vmath.hpp.git
synced 2025-12-16 22:19:51 +07:00
remove union data
This commit is contained in:
@@ -7,7 +7,9 @@
|
||||
#pragma once
|
||||
|
||||
#include "vmath_fwd.hpp"
|
||||
|
||||
#include "vmath_vec.hpp"
|
||||
#include "vmath_vec_fun.hpp"
|
||||
|
||||
namespace vmath_hpp::detail
|
||||
{
|
||||
@@ -220,34 +222,3 @@ namespace vmath_hpp
|
||||
l.swap(r);
|
||||
}
|
||||
}
|
||||
|
||||
namespace vmath_hpp
|
||||
{
|
||||
template < typename T, std::size_t Size >
|
||||
constexpr bool operator==(const mat<T, Size>& l, const mat<T, Size>& r) {
|
||||
for ( std::size_t i = 0; i < Size; ++i ) {
|
||||
if ( !(l[i] == r[i]) ) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
template < typename T, std::size_t Size >
|
||||
constexpr bool operator!=(const mat<T, Size>& l, const mat<T, Size>& r) {
|
||||
return !(l == r);
|
||||
}
|
||||
|
||||
template < typename T, std::size_t Size >
|
||||
constexpr bool operator<(const mat<T, Size>& l, const mat<T, Size>& r) {
|
||||
for ( std::size_t i = 0; i < Size; ++i ) {
|
||||
if ( l[i] < r[i] ) {
|
||||
return true;
|
||||
}
|
||||
if ( r[i] < l[i] ) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user