summaryrefslogtreecommitdiffstats
path: root/trek
diff options
context:
space:
mode:
authormrg <mrg@NetBSD.org>2011-07-03 06:44:01 +0000
committermrg <mrg@NetBSD.org>2011-07-03 06:44:01 +0000
commitdd0ac9f95219fa1eafce09b024638b47c1baf353 (patch)
treec02d2c75cad3b6440f79f08fde3fd5c802baaa08 /trek
parent98a4fc6346f602b2e70306c8a0c79c4e984d1009 (diff)
downloadbsdgames-darwin-dd0ac9f95219fa1eafce09b024638b47c1baf353.tar.gz
bsdgames-darwin-dd0ac9f95219fa1eafce09b024638b47c1baf353.tar.zst
bsdgames-darwin-dd0ac9f95219fa1eafce09b024638b47c1baf353.zip
use DBL_MIN from <float.h> instead of a hard coded small value (that
becomes zero for vax fp.)
Diffstat (limited to 'trek')
-rw-r--r--trek/move.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/trek/move.c b/trek/move.c
index 2ba6106b..cec5dfca 100644
--- a/trek/move.c
+++ b/trek/move.c
@@ -1,4 +1,4 @@
-/* $NetBSD: move.c,v 1.10 2009/05/24 22:55:03 dholland Exp $ */
+/* $NetBSD: move.c,v 1.11 2011/07/03 06:44:01 mrg Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,12 +34,13 @@
#if 0
static char sccsid[] = "@(#)move.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: move.c,v 1.10 2009/05/24 22:55:03 dholland Exp $");
+__RCSID("$NetBSD: move.c,v 1.11 2011/07/03 06:44:01 mrg Exp $");
#endif
#endif /* not lint */
#include <stdio.h>
#include <math.h>
+#include <float.h>
#include "trek.h"
/*
@@ -128,7 +129,7 @@ move(int ramflag, int course, double time, double speed)
evtime += 0.005;
time = evtime;
} else
- evtime = -1.0e50;
+ evtime = DBL_MIN;
dist = time * speed;
/* move within quadrant */