| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
 | | Quintiq file version 2.0 |  | #parent: #root |  | StaticMethod GetIsBalanceWithinRelativeTolerance ( |  |   Real referencevalue, |  |   Real comparedvalue, |  |   Real relativetolerance |  | ) declarative remote as Boolean |  | { |  |   Description: 'Checks if the relative difference between referencevalue and comparedvalue is smaller than the lot size tolerance set in global parameter.' |  |   TextBody: |  |   [* |  |     // desmondt Aug-19-2015 (modified) |  |     value := true; |  |      |  |     if( referencevalue > 0 ) |  |     { |  |       balance := abs( comparedvalue - referencevalue ); |  |       difference :=  balance / referencevalue; |  |       value := relativetolerance >= difference ; |  |     } |  |      |  |     return value |  |   *] |  | } | 
 |