]> git.mxchange.org Git - flightgear.git/commit
Patch from Julian Foad to fix wrapping behaviour for property-adjust
authordavid <david>
Sat, 4 Jan 2003 18:47:25 +0000 (18:47 +0000)
committerdavid <david>
Sat, 4 Jan 2003 18:47:25 +0000 (18:47 +0000)
commit1ec788b6da5b2f9233f99069a9eeb60121b66661
treec1439867eb9da61868298f581aa4614e1b57078f
parenta1d4e79127aeecbd6292ca2951c927ec0bc47bf4
Patch from Julian Foad to fix wrapping behaviour for property-adjust
and property-multiply:

Firstly, change back to wrapping modulo the interval, with "min <= x <
max" semantics.  I believe the previous implementation did that.  The
inline function that Norman mentioned also does that.

Secondly, make it snap to the nearest value (min + N*resolution) when a
"resolution" tag is present, taking special care of floating-point
precision.  Or perhaps specify "number of divisions in the interval" as
an integer, instead of "resolution" by which I meant a floating-point
"size of a division".

[also fixed]

While working on this file I noticed some potentially serious warnings:

fg_commands.cxx: In function `bool do_property_adjust(const
SGPropertyNode*)':
fg_commands.cxx:435: warning: control reaches end of non-void function
fg_commands.cxx: In function `bool do_property_multiply(const
SGPropertyNode*)':
fg_commands.cxx:465: warning: control reaches end of non-void function
/usr/local/include/simgear/misc/props.hxx: At top level:
fg_commands.cxx:600: warning: `bool do_presets_commit(const
SGPropertyNode*)' defined but not used
src/Main/fg_commands.cxx