]> git.mxchange.org Git - simgear.git/commit
Implement #327 Add condition checking the range of a value
authorTorsten Dreyer <Torsten@t3r.de>
Wed, 24 Aug 2011 19:26:02 +0000 (21:26 +0200)
committerTorsten Dreyer <Torsten@t3r.de>
Wed, 24 Aug 2011 19:26:02 +0000 (21:26 +0200)
commit09e610b900e6751da635619513a53972f9e67861
tree7ee7ff4bb425be8d4a2e82d0e224f6e6a013bec2
parentb3175205434bca918170dea198444db18fd0d7da
Implement #327  Add condition checking the range of a value

New feature for <condition> elements:
An (optional) element <precision> allows for fuzzy equals checks
example:
<condition>
  <equals>
    <property>/foo</property>
    <value type="double">0.0</value>
    <precision>0.1</precision>
  </equals>
</condition>

This condition evaluates as true if /foo is within [-0.05..0.05]
(both inclusive)
The precision tag works for int, long, float and double propeties.
It has no meaning for bool properties. For string properties,
precision sets the length of the strings to compare.
simgear/props/condition.cxx