newton.math.vec_allclose#
- newton.math.vec_allclose(a, b, rtol=1e-5, atol=1e-8)[source]#
Check whether two Warp vectors are element-wise equal within a tolerance.
Uses NumPy’s
allclosetolerance criterion for finite elements:abs(a[i] - b[i]) <= atol + rtol * abs(b[i]). NaN values are never close. Infinite values are close only when they have the same sign.