Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/games/trek use DBL_MIN from <float.h> instead of a hard code...
details: https://anonhg.NetBSD.org/src/rev/2dc6ade2a89a
branches: trunk
changeset: 766834:2dc6ade2a89a
user: mrg <mrg%NetBSD.org@localhost>
date: Sun Jul 03 06:44:01 2011 +0000
description:
use DBL_MIN from <float.h> instead of a hard coded small value (that
becomes zero for vax fp.)
diffstat:
games/trek/move.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (33 lines):
diff -r 5ef935a1d290 -r 2dc6ade2a89a games/trek/move.c
--- a/games/trek/move.c Sun Jul 03 06:43:16 2011 +0000
+++ b/games/trek/move.c Sun Jul 03 06:44:01 2011 +0000
@@ -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 @@
evtime += 0.005;
time = evtime;
} else
- evtime = -1.0e50;
+ evtime = DBL_MIN;
dist = time * speed;
/* move within quadrant */
Home |
Main Index |
Thread Index |
Old Index