Revision: 42072
http://brlcad.svn.sourceforge.net/brlcad/?rev=42072&view=rev
Author: brlcad
Date: 2011-01-11 08:33:42 +0000 (Tue, 11 Jan 2011)
Log Message:
-----------
use EQUAL() for exact floating point comparison
Modified Paths:
--------------
brlcad/trunk/src/libged/bot.c
Modified: brlcad/trunk/src/libged/bot.c
===================================================================
--- brlcad/trunk/src/libged/bot.c 2011-01-11 08:33:19 UTC (rev 42071)
+++ brlcad/trunk/src/libged/bot.c 2011-01-11 08:33:42 UTC (rev 42072)
@@ -45,7 +45,6 @@
const char *sub;
const char *arg;
const char *primitive = argv[argc - 1];
- char prop = '\0';
size_t len;
fastf_t tmp;
fastf_t propVal;
@@ -86,12 +85,12 @@
propVal = rt_bot_propget(bot, arg);
/* print result string */
- if (propVal != -1) {
+ if (!EQUAL(propVal, -1.0)) {
tmp = (int) propVal;
/* int result */
- if (propVal == tmp) {
+ if (EQUAL(propVal, tmp)) {
bu_vls_printf(&gedp->ged_result_str, "%d", (int) propVal);
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web. Learn how to
best implement a security strategy that keeps consumers' information secure
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits