%%PageItemTitle%%

VectorDraw Web Library

JsPropertiesExtractor Send comments on this topic.
AreEqual Method
See Also  Example
vdWebLibrary Namespace > vdgeo Class : AreEqual Method
val1
The first numerical value to be checked.
val2
The second numerical value to be checked.
equality
The minimum difference of the two values. Any difference smaller than this parameter will be considered 0.
Checks if the difference between the two numerical values is smaller or larger than the equality passed as the third parameter.

Syntax

JScript 
public function AreEqual( 
   val1 : double,
   val2 : double,
   equality : double
) : boolean;

Parameters

val1
The first numerical value to be checked.
val2
The second numerical value to be checked.
equality
The minimum difference of the two values. Any difference smaller than this parameter will be considered 0.

Return Value

True if the difference is smaller than the equality, false if the difference is larger.

Example

C#Copy Code
var v = vdgeo.newpoint(X, Y, Z); 
if (vdgeo.AreEqual(v[0], 0.0, vdgeo.DefaultLinearEquality)) 
   return;

See Also