coord/ops: use vector ops for point difference

This commit is contained in:
Danny Robson 2017-08-27 12:27:26 +10:00
parent 31652ed3a3
commit 677a0aa4a9

View File

@ -367,10 +367,7 @@ namespace util {
vector<S,std::common_type_t<T,U>>
operator- (point<S,T> a, point<S,U> b)
{
vector<S,std::common_type_t<T,U>> out {};
for (size_t i = 0; i < S; ++i)
out[i] = a[i] - b[i];
return out;
return a.template as<vector> () - b.template as<vector> ();
}