ops_quadric.hh 328 Bytes
Newer Older
1
2
3
4
5
6
#pragma once

#include <typed-geometry/types/quadric.hh>

namespace tg
{
7
8
template <int D, class ScalarT>
TG_NODISCARD constexpr quadric<D, ScalarT> operator+(quadric<D, ScalarT> const& a, quadric<D, ScalarT> const& b)
9
{
10
    quadric<D, ScalarT> r = a; // copy
11
12
13
14
15
16
    r.add(b);
    return r;
}

// TODO: scalar scaling + division?
}