XYZIsAlmostEqualTo(XYZ, Double) Method |
Determines whether 2 vectors are the same within the given tolerance.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntaxpublic bool IsAlmostEqualTo(
XYZ source,
double tolerance
)
Public Function IsAlmostEqualTo (
source As XYZ,
tolerance As Double
) As Boolean
public:
bool IsAlmostEqualTo(
XYZ^ source,
double tolerance
)
member IsAlmostEqualTo :
source : XYZ *
tolerance : float -> bool
Parameters
- source XYZ
- The vector to compare with this vector.
- tolerance Double
- The tolerance for equality check.
Return Value
BooleanTrue if the vectors are the same; otherwise, false.
Exceptions
RemarksThis routine uses an input tolerance to compare two vectors to see if they are almost equivalent. Because it is
comparing two vectors the tolerance value is not in length units but instead represents the variation in direction
between the vectors. For very small tolerance values it should also be possible to compare two points
with this method. To compute the distance between two points for a comparison with a larger allowable difference, use
DistanceTo(XYZ).
See Also