Action:
|
Compares two real numbers.
|
|
Filename:
|
kern/kern_scm/law_scm.cxx
|
|
Syntax:
|
(test:greater-than variable fixed [tolerance] [msg])
|
|
Arg Types:
|
variable
|
real
|
|
fixed
|
real
|
|
tolerance
|
real
|
|
msg
|
string
|
|
Returns:
|
boolean
|
|
Description:
|
Compares variable to fixed, returning true if the variable is greater than the fixed. If the variable is less than the fixed by an amount less than the tolerance, the result is also true.
|
|
|
variable and
fixed specify the arguments to be tested.
|
|
|
tolerance specifies the tolerance value to be used.
|
|
|
If a
msg string is specified, this string prints out to the debug file if the result is false.
|
|
Example:
|
; test:greater-than
|
|
(test:greater-than 2 1)
|
|
;; #t
|
|
(test:greater-than 2.0 2.1 0.2
|
|
|
"greater within tolerance")
|
|
;; #t
|