aboutsummaryrefslogtreecommitdiff
path: root/src/poser_charlesslow.c
diff options
context:
space:
mode:
authormwturvey <michael.w.turvey@intel.com>2017-03-17 14:41:59 -0700
committermwturvey <michael.w.turvey@intel.com>2017-03-17 14:41:59 -0700
commitb6981854dff11022e3de56e56cbf4633f1c49598 (patch)
treef5b8f4ff1425f704d791d5b9af9c8af65455868d /src/poser_charlesslow.c
parent94be8ccdbfb2f44c9bc569428537444030ba8eeb (diff)
parenta53c520c2d1a3bb9faa4cb5e4ee9ccc48bb1835f (diff)
downloadlibsurvive-b6981854dff11022e3de56e56cbf4633f1c49598.tar.gz
libsurvive-b6981854dff11022e3de56e56cbf4633f1c49598.tar.bz2
Merge branch 'master' into UsbTrackerOnWin
# Conflicts: # src/survive_vive.c
Diffstat (limited to 'src/poser_charlesslow.c')
-rw-r--r--src/poser_charlesslow.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/poser_charlesslow.c b/src/poser_charlesslow.c
index def8323..080ad6a 100644
--- a/src/poser_charlesslow.c
+++ b/src/poser_charlesslow.c
@@ -123,9 +123,9 @@ int PoserCharlesSlow( SurviveObject * so, PoserData * pd )
ft = RunOpti(so, fs, lh, 0, LighthousePos, LighthouseQuat);
if( cycle == 0 )
{
- float sk = ft*10.;
+ FLT sk = ft*10.;
if( sk > 1 ) sk = 1;
- uint8_t cell = (1.0 - sk) * 255;
+ uint8_t cell = (uint8_t)((1.0 - sk) * 255);
FLT epsilon = 0.1;
if( dz == 0 ) { /* Why is dz special? ? */
@@ -231,7 +231,7 @@ static FLT RunOpti( SurviveObject * hmd, PoserDataFullScene * fs, int lh, int pr
if( fs->lengths[p][lh][0] < 0 || fs->lengths[p][lh][1] < 0 ) continue;
FLT me_to_dot[3];
sub3d( me_to_dot, LighthousePos, &hmd_points[p*3] );
- float dot = dot3d( &hmd_normals[p*3], me_to_dot );
+ FLT dot = dot3d( &hmd_normals[p*3], me_to_dot );
if( dot < -.01 ) { return 1000; }
}
int iters = 6;
@@ -321,7 +321,7 @@ static FLT RunOpti( SurviveObject * hmd, PoserDataFullScene * fs, int lh, int pr
}
//Step 2: Determine error.
- float errorsq = 0.0;
+ FLT errorsq = 0.0;
int count = 0;
for( p = 0; p < dpts; p++ )
{