Andy Ross wrote:
> 
> If you guys are thinking of changing the way we do "linear function of
> a property value" definitions in configurations, let me argue for a
> slightly different way to do it:
...
> Instead, why not specify a range mapping.  That is, input values in
> the range [a,b] get mapped linearly to output values in the range
> [c,d].  Input values outside of [a,b] can be clamped to that range
> before computation.  This has a few advantages:

Yes, agreed.  It even extends nicely to an interpolation table just by specifying 
mappings of more than two values.

The "clamping" aspect is not necessarily an advantage; it should be optional.  Very 
often you don't want to specify a maximum (or a minimum in some cases).  If you are 
forced to specify one, it will be arbitrary, which is bad.  We could provide a method 
of specifying whether the range (uh, domain) is to be clamped at one end or both ends. 
 Don't know whether clamping should be on or off by default.

Note to others: a range mapping is a different way of specifying exactly the same 
thing that is currently specified by scale   offset   min   max, so we could provide 
both alternatives for the XML format, using the same (existing?) internal storage and 
processing for both, if that is deemed sensible.

- Julian


_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to