// =========================================================================== // Copyright 2018 Autodesk, Inc. All rights reserved. // // Use of this software is subject to the terms of the Autodesk license // agreement provided at the time of installation or download, or which // otherwise accompanies this software in either electronic or hard copy form. // =========================================================================== // // // Creation Date: September 7 1999 // // // // // int equivalentTol(float $a, float $b, float $tol) // // // Compare 2 float values within the given tolerance value. // // // float $a First value to compare // float $b Value to compare with // // // int : 1 if values are within the given tolerance value // // // equivalentTol(0.0, 0.0005, 0.001); // // Result : 1 // // equivalentTol(0.0, 0.005, 0.001); // // Result : 0 // // // global proc int equivalentTol( float $a, float $b, float $tol ) { return( abs($a - $b) <= $tol); }