diff options
Diffstat (limited to 'modules/codec/c++/math.hpp')
| -rw-r--r-- | modules/codec/c++/math.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/codec/c++/math.hpp b/modules/codec/c++/math.hpp index 6e1ec8b..a227b46 100644 --- a/modules/codec/c++/math.hpp +++ b/modules/codec/c++/math.hpp @@ -97,13 +97,13 @@ data<schema::Vector<T,3u>, Encoding> cross( } template<typename T, typename Encoding = FORSTIO_DEFAULT_DATA_ENCODING> -data<T,Encoding> cross( +data<schema::Scalar<T>,Encoding> cross( const data<schema::Vector<T,2u>, Encoding> lh, const data<schema::Vector<T,2u>, Encoding> rh ){ - data<T, Encoding> cross_prod; + data<schema::Scalar<T>, Encoding> cross_prod; - cross_prod = lh.at({{0u}}) * rh.at({{1u}}) - lh.at({{1u}}) * rh.at({{0u}}); + cross_prod.at({}) = lh.at({{0u}}) * rh.at({{1u}}) - lh.at({{1u}}) * rh.at({{0u}}); return cross_prod; } |
