Permalink
Browse files

Fix bug in convert_screen_coords_to_mm

  • Loading branch information...
1 parent 214cca1 commit 440fbc106fb80d93b33bc0d2e4fcd821eacbda3d @iaguis iaguis committed with Sep 11, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 skeltrack/skeltrack-util.c
View
2 skeltrack/skeltrack-util.c
@@ -560,7 +560,7 @@ convert_screen_coords_to_mm (guint width,
{
/* Formula from http://openkinect.org/wiki/Imaging_Information */
*x = round((i * dimension_reduction - width * dimension_reduction / 2.0) *
- (z + MIN_DISTANCE) * SCALE_FACTOR * (width / height));
+ (z + MIN_DISTANCE) * SCALE_FACTOR * ((gfloat) width / height));
*y = round((j * dimension_reduction - height * dimension_reduction / 2.0) *
(z + MIN_DISTANCE) * SCALE_FACTOR);
}

0 comments on commit 440fbc1

Please sign in to comment.