Apply const float & more
This commit is contained in:
@ -52,7 +52,7 @@ void inline incremental_LSF_reset(struct linear_fit_data *lsf) {
|
||||
memset(lsf, 0, sizeof(linear_fit_data));
|
||||
}
|
||||
|
||||
void inline incremental_WLSF(struct linear_fit_data *lsf, float x, float y, float z, float w) {
|
||||
void inline incremental_WLSF(struct linear_fit_data *lsf, const float &x, const float &y, const float &z, const float &w) {
|
||||
// weight each accumulator by factor w, including the "number" of samples
|
||||
// (analagous to calling inc_LSF twice with same values to weight it by 2X)
|
||||
lsf->xbar += w * x;
|
||||
@ -65,11 +65,11 @@ void inline incremental_WLSF(struct linear_fit_data *lsf, float x, float y, floa
|
||||
lsf->xzbar += w * x * z;
|
||||
lsf->yzbar += w * y * z;
|
||||
lsf->N += w;
|
||||
lsf->max_absx = max(fabs( w * x ), lsf->max_absx);
|
||||
lsf->max_absy = max(fabs( w * y ), lsf->max_absy);
|
||||
lsf->max_absx = max(fabs(w * x), lsf->max_absx);
|
||||
lsf->max_absy = max(fabs(w * y), lsf->max_absy);
|
||||
}
|
||||
|
||||
void inline incremental_LSF(struct linear_fit_data *lsf, float x, float y, float z) {
|
||||
void inline incremental_LSF(struct linear_fit_data *lsf, const float &x, const float &y, const float &z) {
|
||||
lsf->xbar += x;
|
||||
lsf->ybar += y;
|
||||
lsf->zbar += z;
|
||||
|
Reference in New Issue
Block a user