You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// \brief Equality test with tolerance vector.
/// \param[in] _v the vector to compare to
/// \param[in] _tol a vector containing equality tolerances.
/// \return true if the elements of the vectors are equal within
/// the tolerence specified by _tol.
public: bool Equal(const Vector3 &_v, const Vector3 &_tol) const
{
return equal<T>(this->data[0], _v[0], _tol[0])
&& equal<T>(this->data[1], _v[1], _tol[1])
&& equal<T>(this->data[2], _v[2], _tol[2]);
}
Based on discussion in pull request #82, we might need to extend it further with:
Original comment by Michael Sherman (Bitbucket: sherm1).
I don't think it would be useful to have elementwise tolerance because of the difficulty in supplying meaningful values for them. Having a relative tolerance available makes that largely unnecessary since that produces a different absolute tolerance for each element based on its size.
Original report (archived issue) by John Hsu (Bitbucket: hsu, GitHub: hsu).
Curently, the Vector3::Equal with tolerance check uses a single tolerance for all three elements.
Proposal to extend it by adding:
Based on discussion in pull request #82, we might need to extend it further with:
The text was updated successfully, but these errors were encountered: