diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2013-09-19 18:16:44 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2013-09-19 18:16:44 +0200 |
commit | 7d95cb69ead5e427b900184021de73b65a58f982 (patch) | |
tree | 713e63df4ab63aa76d05d5cd99e2110b5dc6af19 | |
parent | 65229f5ad8ce2c8e999b0cf181c11383b0a9effb (diff) |
clean up implicit conversions float -> double
-rw-r--r-- | facetracknoir/tracker.cpp | 2 | ||||
-rw-r--r-- | ftnoir_filter_ewma2/ftnoir_filter_ewma2.cpp | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/facetracknoir/tracker.cpp b/facetracknoir/tracker.cpp index ab62590b..b965140b 100644 --- a/facetracknoir/tracker.cpp +++ b/facetracknoir/tracker.cpp @@ -189,4 +189,4 @@ void Tracker::getOutputHeadPose( double *data ) { data[i] = output_camera.axes[i];
}
-void Tracker::setInvertAxis(Axis axis, bool invert) { mainApp->axis(axis).invert = invert?-1.0f:1.0f; }
+void Tracker::setInvertAxis(Axis axis, bool invert) { mainApp->axis(axis).invert = invert? -1.0 : 1.0; }
diff --git a/ftnoir_filter_ewma2/ftnoir_filter_ewma2.cpp b/ftnoir_filter_ewma2/ftnoir_filter_ewma2.cpp index f50c60d1..69d18d9b 100644 --- a/ftnoir_filter_ewma2/ftnoir_filter_ewma2.cpp +++ b/ftnoir_filter_ewma2/ftnoir_filter_ewma2.cpp @@ -64,7 +64,7 @@ void FTNoIR_Filter::loadSettings() { qDebug() << "FTNoIR_Filter::loadSettings says: Starting ";
QSettings settings("opentrack"); // Registry settings (in HK_USER)
- QString currentFile = settings.value ( "SettingsFile", QCoreApplication::applicationDirPath() + "/settings/default.ini" ).toString(); + QString currentFile = settings.value ( "SettingsFile", QCoreApplication::applicationDirPath() + "/settings/default.ini" ).toString();
QSettings iniFile( currentFile, QSettings::IniFormat ); // Application settings (in INI-file)
qDebug() << "FTNoIR_Filter::loadSettings says: iniFile = " << currentFile;
@@ -108,7 +108,7 @@ void FTNoIR_Filter::FilterHeadPoseData(const double *target_camera_position, // Calculate the new alpha from the normalized delta.
new_alpha=1.0/(kMinSmoothing+((1.0-pow(delta,kSmoothingScaleCurve))*(kMaxSmoothing-kMinSmoothing)));
// Update the smoothed alpha.
- alpha[i]=(alpha_smoothing*new_alpha)+((1.0f-alpha_smoothing)*alpha[i]);
+ alpha[i]=(alpha_smoothing*new_alpha)+((1.0-alpha_smoothing)*alpha[i]);
}
// Use the same (largest) smoothed alpha for each channel
@@ -120,7 +120,7 @@ void FTNoIR_Filter::FilterHeadPoseData(const double *target_camera_position, // Calculate the new camera position.
for (int i=0;i<6;i++) {
- new_camera_position[i]=(largest_alpha*target_camera_position[i])+((1.0f-largest_alpha)*current_camera_position[i]);
+ new_camera_position[i]=(largest_alpha*target_camera_position[i])+((1.0-largest_alpha)*current_camera_position[i]);
//new_camera_position[i]=(alpha[i]*target_camera_position[i])+((1.0f-alpha[i])*current_camera_position[i]);
}
|