fixed maxValue functions
This commit is contained in:
parent
ad01642fee
commit
2c8f1886f6
@ -54,7 +54,7 @@ class VectorOperations {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static T maxAbsValue(const T *vector, uint8_t size, uint8_t *index = 0) {
|
static T maxAbsValue(const T *vector, uint8_t size, uint8_t *index = 0) {
|
||||||
T max = -1;
|
T max = vector[size];
|
||||||
|
|
||||||
for (; size > 0; size--) {
|
for (; size > 0; size--) {
|
||||||
T abs = vector[size - 1];
|
T abs = vector[size - 1];
|
||||||
@ -72,7 +72,7 @@ class VectorOperations {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static T maxValue(const T *vector, uint8_t size, uint8_t *index = 0) {
|
static T maxValue(const T *vector, uint8_t size, uint8_t *index = 0) {
|
||||||
T max = -1;
|
T max = vector[size];
|
||||||
|
|
||||||
for (; size > 0; size--) {
|
for (; size > 0; size--) {
|
||||||
if (vector[size - 1] > max) {
|
if (vector[size - 1] > max) {
|
||||||
|
Loading…
Reference in New Issue
Block a user