VS:Eq: Difference between revisions

From Vectorworks Developer
Jump to navigation Jump to search
m (1 revision)
m (1 revision)
 
(One intermediate revision by the same user not shown)
Line 5: Line 5:
-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
<desc>
<desc>
Returns TRUE if the numbers are equal within the tolerance.
Returns TRUE if the two real numbers are equal within the tolerance.</desc>
</desc>


-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
<def>
<def>
<funcDef lang="vs">
<funcDef lang="vs">
FUNCTION Eq(value1 :REAL; value2 :REAL; tolerance :REAL) :BOOLEAN;
FUNCTION Eq(value1:REAL; value2:REAL; tolerance:REAL) : BOOLEAN;
</funcDef>
</funcDef>
<funcDef lang="py">
<funcDef lang="py">
Line 39: Line 38:
</lineList>
</lineList>
</params>
</params>


-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
<return>
<remark></remark>
</return>


-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
<remark>
<sample></sample>
 
</remark>


-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
<sample>
<seeAlso></seeAlso>
<code lang="pas">
PROCEDURE Example;
VAR
  val1, val2, tol  :REAL;
BEGIN
  val1 := RealDialog('Enter value1:', '0');
  val2 := RealDialog('Enter value2:', '0');
  tol  := RealDialog('Enter tolerance for comparison:', '0.01');
  IF Eq(val1, val2, tol)
      THEN AlrtDialog(Concat(val1, ' == ', val2, ' in tolerance: ', tol))
      ELSE AlrtDialog(Concat(val1, ' != ', val2, ' in tolerance: ', tol))
END;
RUN(Example);</code>
 
</sample>


-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
<version>
<version>
Availability: from All Versions
Availability: from Vectorworks 2014


This is drop-in function.
</version>
</version>
-----------------------------------------------------------------------------------------------------------
<seeAlso>
</seeAlso>


</vwDoc>
</vwDoc>


[[Category:VS Function Reference|Eq]]
[[Category:VS Function Reference|Eq]]
[[Category:VS Function Reference:Math - General|Eq]]
[[Category:VS Function Reference:Graphic Calculation|Eq]]

Latest revision as of 17:35, 18 September 2013

.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix

Description

Returns TRUE if the two real numbers are equal within the tolerance.

FUNCTION Eq(
value1 :REAL;
value2 :REAL;
tolerance :REAL) : BOOLEAN;
def vs.Eq(value1, value2, tolerance):
    return BOOLEAN

Parameters

value1 REAL
value2 REAL
tolerance REAL

Version

Availability: from Vectorworks 2014