Revision: 52569
          http://brlcad.svn.sourceforge.net/brlcad/?rev=52569&view=rev
Author:   brlcad
Date:     2012-09-27 04:47:55 +0000 (Thu, 27 Sep 2012)
Log Message:
-----------
exact floating point comparisons are bad, but the patch included one too.  
moreover, looks like the mod should be altogether unnecessary since we can just 
call Length().  looks like the change messes with the header's documented 
notion of a singleton.  probably worth discussing with rhino folks if we need 
to clean it up since there are other exact comparisons.

Modified Paths:
--------------
    brlcad/trunk/src/other/openNURBS/opennurbs_point.cpp

Modified: brlcad/trunk/src/other/openNURBS/opennurbs_point.cpp
===================================================================
--- brlcad/trunk/src/other/openNURBS/opennurbs_point.cpp        2012-09-27 
04:42:35 UTC (rev 52568)
+++ brlcad/trunk/src/other/openNURBS/opennurbs_point.cpp        2012-09-27 
04:47:55 UTC (rev 52569)
@@ -139,14 +139,14 @@
 bool
 ON_Interval::IsInterval() const
 {
-  return ( abs(m_t[0] - m_t[1]) > ON_ZERO_TOLERANCE && ON_IS_VALID(m_t[0]) && 
ON_IS_VALID(m_t[1]) ) ? true : false;
+  return ( m_t[0] != m_t[1] && ON_IS_VALID(m_t[0]) && ON_IS_VALID(m_t[1]) ) ? 
true : false;
 }
 
 
 bool
 ON_Interval::IsSingleton() const
 {
-  return ( abs(m_t[0] - m_t[1]) <= ON_ZERO_TOLERANCE && ON_IS_VALID(m_t[1]) ) 
? true : false;
+  return ( m_t[0] == m_t[1] && ON_IS_VALID(m_t[1]) ) ? true : false;
 }
 
 bool

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://ad.doubleclick.net/clk;258768047;13503038;j?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to