summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudius "keldu" Holeksa <mail@keldu.de>2026-02-18 13:23:05 +0100
committerClaudius "keldu" Holeksa <mail@keldu.de>2026-02-18 13:23:05 +0100
commita2b960431a6b69c7e1ebd45fafdffef8eb06937a (patch)
tree84d590b0fc78a3957ebc4571a29c1f3589a78409
parent6f2555bab2b1ef4287cd9d6f117aeefc88580f7d (diff)
downloadforstio-forstio-a2b960431a6b69c7e1ebd45fafdffef8eb06937a.tar.gz
Changing return value in cross prod to Scalar
-rw-r--r--modules/codec/c++/math.hpp6
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;
}