coord/ops: use vector ops for point difference
This commit is contained in:
parent
31652ed3a3
commit
677a0aa4a9
@ -367,10 +367,7 @@ namespace util {
|
|||||||
vector<S,std::common_type_t<T,U>>
|
vector<S,std::common_type_t<T,U>>
|
||||||
operator- (point<S,T> a, point<S,U> b)
|
operator- (point<S,T> a, point<S,U> b)
|
||||||
{
|
{
|
||||||
vector<S,std::common_type_t<T,U>> out {};
|
return a.template as<vector> () - b.template as<vector> ();
|
||||||
for (size_t i = 0; i < S; ++i)
|
|
||||||
out[i] = a[i] - b[i];
|
|
||||||
return out;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user