Returns the positive
realvalue of smallest magnitude \epsilon that should be used as a coordinate value in aPoint. A coordinate of aPointmay also contain -\epsilon.The value \epsilon is used for testing the equality of
PointsinPoint::operator==()(see Point Reference; Operators):Let \epsilon be the value returned by
epsilon(), P and Q bePoints, and P_x, Q_x, P_y, Q_y, P_z, and Q_z the updated x, y, and z-coordinates of P and Q, respectively. If and only if ||P_x| - |Q_x|| < \epsilon, ||P_y| - |Q_y|| < \epsilon, and ||P_z| - |Q_z|| < \epsilon, then P = Q.
epsilon()returns different values, depending on whetherrealisfloatordouble: Ifrealisfloat(the default),epsilon()returns 0.00001. Ifrealisdouble, it returns 0.000000001.Please note: I haven't tested whether 0.000000001 is a good value yet, so users should be aware of this if they set
realtodouble!1 The way to test this is to start with twoPointsP and Q at different locations. Then they should be transformed using different rotations in such a way that they should end up at the same location. Let \epsilon stand for the value returned byepsilon(), and let x, y, and y stand for theworld_coordinatesof thePointsafterapply_transform()has been called on them. If x_P = x_Q, y_P = y_Q, and z_P = z_Q, \epsilon is a good value.Rotation causes a significant loss of precision to due to the use of the
sin()andcos()functions. Therefore, neitherPoint::epsilon()norTransform::epsilon()(see Tranform Reference; Returning Information) can be as small as I'd like them to be. If they are two small, operations that test for equality ofTransformsandPointswill returnfalsefor objects that should be equal.
[1] For that matter, I haven't really tested whether 0.00001 is a
good value when real is float.