diff --git a/src/fsfw/globalfunctions/math/VectorOperations.h b/src/fsfw/globalfunctions/math/VectorOperations.h index 197cd46a..1e84330e 100644 --- a/src/fsfw/globalfunctions/math/VectorOperations.h +++ b/src/fsfw/globalfunctions/math/VectorOperations.h @@ -54,7 +54,7 @@ class VectorOperations { } static T maxAbsValue(const T *vector, uint8_t size, uint8_t *index = 0) { - T max = -1; + T max = vector[size - 1]; for (; size > 0; size--) { T abs = vector[size - 1]; @@ -72,7 +72,7 @@ class VectorOperations { } static T maxValue(const T *vector, uint8_t size, uint8_t *index = 0) { - T max = -1; + T max = vector[size - 1]; for (; size > 0; size--) { if (vector[size - 1] > max) {