From 15ef687c28d7053d261204e4cb952c752d51b1bd Mon Sep 17 00:00:00 2001 From: David Hilvert Date: Thu, 15 Feb 2007 00:22:00 +0000 Subject: [PATCH] Allow more flexibility in the return value of isinf(). darcs-hash:20070215002246-d1b56-8661a4955951c97a5a6f61db0875fa303402eeb4.gz --- d3/point.h | 4 ++-- d3/scene.h | 2 +- ui/input.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/d3/point.h b/d3/point.h index b7e3b29..b8fa949 100644 --- a/d3/point.h +++ b/d3/point.h @@ -72,7 +72,7 @@ public: a = a / z; - assert (isinf(a) == +1); + assert (isinf(a) && a > 0); return point(a, a, a); } @@ -80,7 +80,7 @@ public: static point neginf() { point n = -posinf(); - assert (isinf(n[0]) == -1); + assert (isinf(n[0]) && n[0] < 0); return n; } diff --git a/d3/scene.h b/d3/scene.h index 66b26f8..10d3506 100644 --- a/d3/scene.h +++ b/d3/scene.h @@ -1551,7 +1551,7 @@ public: ale_pos zero = +0; rear_clip = one / zero; - assert(isinf(rear_clip) == +1); + assert(isinf(rear_clip) && rear_clip > 0); } /* diff --git a/ui/input.h b/ui/input.h index 3dc8a6d..dc55b9b 100644 --- a/ui/input.h +++ b/ui/input.h @@ -1631,7 +1631,7 @@ public: double zero = +0; double inf = one / zero; - assert (isinf(inf) == +1); + assert (isinf(inf) && inf > 0); /* * Focus type -- 2.11.4.GIT