VS:EqPt: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
m (1 revision) |
(No difference)
|
Revision as of 14:29, 12 August 2013
.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix
Description
Returns TRUE if the 2D points are equal within the tolerance.
FUNCTION EqPt(
pt1X, pt1Y, pt1Z :REAL;
pt2X, pt2Y, pt2Z :REAL;
tolerance :REAL) :BOOLEAN;
def vs.EqPt(pt1, pt2, tolerance): return BOOLEAN
Parameters
pt1X, pt1Y, pt1Z REAL pt2X, pt2Y, pt2Z REAL tolerance REAL
Example
PROCEDURE Example; VAR pt1, pt2 :VECTOR; tol :REAL; BEGIN Message('Specify the first point...'); GetPt(pt1.x, pt1.y); Message('Specify the second point...'); GetPt(pt2.x, pt2.y); tol := RealDialog('Enter tolerance for comparison:', '0.001'); IF EqPt(pt1, pt2, tol) THEN AlrtDialog(Concat(pt1, ' == ', pt2, ' in tolerance:', tol)) ELSE AlrtDialog(Concat(pt1, ' != ', pt2, ' in tolerance:', tol)) END; RUN(Example);
Version
Availability: from All Versions
This is drop-in function.