diff options
| author | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-02-18 13:23:05 +0100 |
|---|---|---|
| committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-02-18 13:23:05 +0100 |
| commit | a2b960431a6b69c7e1ebd45fafdffef8eb06937a (patch) | |
| tree | 84d590b0fc78a3957ebc4571a29c1f3589a78409 /modules/codec/c++/math.hpp | |
| parent | 6f2555bab2b1ef4287cd9d6f117aeefc88580f7d (diff) | |
| download | forstio-forstio-a2b960431a6b69c7e1ebd45fafdffef8eb06937a.tar.gz | |
Changing return value in cross prod to Scalar
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; } |
