point/vector: use coord constructors
This commit is contained in:
parent
82ee179b64
commit
64c11bdcb0
@ -31,12 +31,6 @@ using namespace std;
|
||||
#pragma GCC optimize("-O3")
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
template <size_t S, typename T>
|
||||
util::point<S,T>::point ()
|
||||
{ ; }
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
template <size_t S, typename T>
|
||||
util::point<S,T>&
|
||||
|
@ -34,10 +34,7 @@ namespace util {
|
||||
struct point : public detail::coord<S,T> {
|
||||
static_assert (S > 0, "point dimensions must be strictly positive.");
|
||||
|
||||
point ();
|
||||
|
||||
template <typename... U>
|
||||
point (U ...u): detail::coord<S,T> {std::forward<U> (u)...} { ; }
|
||||
using detail::coord<S,T>::coord;
|
||||
|
||||
// point operators
|
||||
template <typename U> typename std::common_type<T,U>::type distance (const point<S,U> &) const;
|
||||
|
@ -38,12 +38,6 @@ using std::begin;
|
||||
using std::end;
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
template <size_t S, typename T>
|
||||
util::vector<S,T>::vector ()
|
||||
{ ; }
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
template <size_t S, typename T>
|
||||
util::vector<S,T>
|
||||
|
@ -32,10 +32,7 @@ namespace util {
|
||||
struct vector : public detail::coord<S, T> {
|
||||
static_assert (S > 0, "vector dimensions must be strictly positive");
|
||||
|
||||
vector ();
|
||||
|
||||
template <typename... U>
|
||||
vector (U ...u): detail::coord<S, T> {std::forward<U> (u)...} { ; }
|
||||
using detail::coord<S,T>::coord;
|
||||
|
||||
// arithmetic operators
|
||||
vector<S,T> operator* (T) const;
|
||||
|
Loading…
Reference in New Issue
Block a user