Changeset 4fc9c7e in tol
- Timestamp:
- Jul 2, 2012, 9:31:39 PM (14 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- 3da496d
- Parents:
- 946360a
- Location:
- tol/bbasic
- Files:
-
- 2 edited
-
dte.cpp (modified) (1 diff)
-
tol_bdate.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
tol/bbasic/dte.cpp
r946360a r4fc9c7e 213 213 } 214 214 215 //#define TRACE_COMPARE 216 BInt BDate::Compare(const BDate* dte1, const BDate* dte2) { 217 #ifdef TRACE_COMPARE 218 std::cout << "Compare: " << std::endl; 219 std::cout << "Hash(dte1) = " << dte1->Hash() << std::endl; 220 std::cout << "Hash(dte2) = " << dte2->Hash() << std::endl; 221 #endif 222 BReal h1 = dte1->Hash(); 223 BReal h2 = dte2->Hash(); 224 BReal dif = h1 - h2; 225 #ifdef TRACE_COMPARE 226 std::cout << "dif: " << dif << std::endl; 227 std::cout << "h1 < h2: " << (h1<h2) << std::endl; 228 #endif 229 BReal dif0 = fabs( dif ); 230 return dif < -1.0e-7 ? -1 : ( dif0 > 1.0e-7 ? 1 : 0 ); 231 } 215 232 216 233 //-------------------------------------------------------------------- -
tol/bbasic/tol_bdate.h
r946360a r4fc9c7e 329 329 * \return Value indicating the lexicographical relation between the dates. 330 330 */ 331 static BInt Compare(const BDate* dte1, const BDate* dte2) { 332 BReal dif = dte1->Hash() - dte2->Hash(); 333 return dif>0 ? 1 : (dif<0 ? -1 : 0); 334 } 331 static BInt Compare(const BDate* dte1, const BDate* dte2); 335 332 336 333 // Support to algebraical operations: dtealgeb.cpp
Note: See TracChangeset
for help on using the changeset viewer.
