diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2018-12-24 18:54:34 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2018-12-24 19:32:10 +0100 |
commit | a88e34b21b07f70123926fcb5c505d6afdf99807 (patch) | |
tree | 905059194dcc64c7c163b8912947d8173fd4cc91 /tracker-wii/wii_point_extractor.cpp | |
parent | 5bf85412e4eacf92acc936b6e74bce0e2b1055d9 (diff) |
style/quality only
No functional changes.
- add `override' everywhere where missing
- almost pass clang's `-Wweak-vtables'
- avoid some float/double conversions
- remove unused private members
- make signedness conversions explicit
- put stuff in right namespaces to aid analysis
Diffstat (limited to 'tracker-wii/wii_point_extractor.cpp')
-rw-r--r-- | tracker-wii/wii_point_extractor.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tracker-wii/wii_point_extractor.cpp b/tracker-wii/wii_point_extractor.cpp index 2da91d01..c5c20c6a 100644 --- a/tracker-wii/wii_point_extractor.cpp +++ b/tracker-wii/wii_point_extractor.cpp @@ -72,8 +72,8 @@ bool WIIPointExtractor::draw_points(cv::Mat& preview_frame, const struct wii_inf if (dot.bvis) { //qDebug() << "wii:" << dot.RawX << "+" << dot.RawY; //anti-clockwise rotate the 2D point - const float RX = W - dot.ux; - const float RY = H - dot.uy; + const double RX = W - dot.ux; + const double RY = H - dot.uy; //vec2 dt((dot.RawX - W / 2.0f) / W, -(dot.RawY - H / 2.0f) / W); //vec2 dt((RX - W / 2.0f) / W, -(RY - H / 2.0f) / W); //vec2 dt((2.0f*RX - W) / W, -(2.0f*RY - H ) / W); @@ -99,8 +99,8 @@ void WIIPointExtractor::draw_bg(cv::Mat& preview_frame, const struct wii_info& w 2); //draw horizon - int pdelta = iround((preview_frame.rows / 4) * tan((wii.Pitch)* M_PI / 180.0f)); - int rdelta = iround((preview_frame.cols / 4) * tan((wii.Roll)* M_PI / 180.0f)); + int pdelta = iround((preview_frame.rows / 4.) * tan(((double)wii.Pitch)* M_PI / 180.)); + int rdelta = iround((preview_frame.cols / 4.) * tan(((double)wii.Roll)* M_PI / 180.)); cv::line(preview_frame, cv::Point(0, preview_frame.rows / 2 + rdelta - pdelta), |