aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJC <jdmc2@solo-system.org>2016-12-18 04:28:35 +0000
committerJC <jdmc2@solo-system.org>2016-12-18 04:28:35 +0000
commitb7fb3da1e3d345d88fffca313fefb8ee8c2e23b0 (patch)
tree4253435f6fe5a7547303e61875265b1a0749f438 /tools
parentecfff2e6c861e145083fef897f3f415d962d08ec (diff)
downloadlibsurvive-b7fb3da1e3d345d88fffca313fefb8ee8c2e23b0.tar.gz
libsurvive-b7fb3da1e3d345d88fffca313fefb8ee8c2e23b0.tar.bz2
better axes, I think.
Diffstat (limited to 'tools')
-rw-r--r--tools/planetest2/camfind.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/tools/planetest2/camfind.c b/tools/planetest2/camfind.c
index 19c522c..796ebbf 100644
--- a/tools/planetest2/camfind.c
+++ b/tools/planetest2/camfind.c
@@ -82,13 +82,16 @@ int main()
float sk = ft*10.;
if( sk > 1 ) sk = 1;
uint8_t cell = (1.0 - sk) * 255;
- if( dz == 0 && ( dx > -0.01 && dx < 0.4 ) && (dy > -0.01 && dy < 0.4 ) )
- {
- fprintf( f, "%c", 255 );
+ FLT epsilon = 0.1;
+
+ if( dz == 0 ) { /* Why is dz special? ? */
+ if ( dx > -epsilon && dx < epsilon )
+ cell = 255;
+ if ( dy > -epsilon && dy < epsilon )
+ cell = 128;
}
- else
- fprintf( f, "%c", cell );
+ fprintf( f, "%c", cell );
}
if( ft < beste ) { beste = ft; memcpy( bestxyzrunning, LighthousePos, sizeof( LighthousePos ) ); }