From f992a6afc4e99691cf70186cf07031ed1f65096e Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Tue, 23 Sep 2025 17:08:11 +0200 Subject: Fixed a bug in normalization --- modules/codec/c++/math.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/codec/c++/math.hpp') diff --git a/modules/codec/c++/math.hpp b/modules/codec/c++/math.hpp index 67d8ed3..ca43dd0 100644 --- a/modules/codec/c++/math.hpp +++ b/modules/codec/c++/math.hpp @@ -35,8 +35,8 @@ data, Encoding> normalize(const data>& i auto sqrt_inp_dot = sqrt(inp_dot); saw::data, Encoding> out; - out.at({{0u}}).set(out.at({{0u}}).get() / sqrt_inp_dot.at({}).get()); - out.at({{1u}}).set(out.at({{1u}}).get() / sqrt_inp_dot.at({}).get()); + out.at({{0u}}).set(input.at({{0u}}).get() / sqrt_inp_dot.at({}).get()); + out.at({{1u}}).set(input.at({{1u}}).get() / sqrt_inp_dot.at({}).get()); return out; } } -- cgit v1.2.3