Dear friends:
I am working on a C++ computational geometry code, and i want to make sure whether two points are the same by comparing their x y and z coordinates. The coordinates of the points are in the double formate.
since the pc can not represents the double number exactly in the memory, and i have a large number of points in a small region, i think it is inaccurate to do the comparison by a simple "==".
Could you please give me some advices on that?
Regards
Your Sincerely.
ztdep
ztdep -8 Junior Poster in Training
sergent 52 Posting Pro
Asen 0 Newbie Poster
template<> 37 Junior Poster
arkoenig 340 Practically a Master Poster
ztdep -8 Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.