Re: frei0r problem with the range of f0r_param_double

"Carlo E. Prelz" <[email protected]>
Newsgroups gmane.comp.video.gephex.devel
Message-ID <[email protected]>
	Subject: frei0r problem with the range of f0r_param_double
	Date: Fri, Dec 17, 2004 at 06:31:02PM +0100

Quoting Martin Bayer ([email protected]):

> I think we must eliminate this discrepancy between spec and usage:
> 
> Solution A:
> 
> Keep the current specification (MUST be in the range) and add an 
> additional parameter type (f0r_param_unbounded_double) for unbounded 
> double values.
> 
> Solution B:
> 
> Change the range specification from "MUST be in the range" to "SHOULD be 
> in the range". And add adapt the existing frei0r plugins to clamp the 
> values to the [0,1] interval if other values are useless.
> 
> Any comments?

A range is needed when creating e.g. a slider for the parameter. The
controlling software could be so gentle to allow the user to modify
the bounds of the range, that may even be larger than the suggested
range. But the range (either to be mapped to 0-1 or to be specified in
some way) is a method to let the user of the module know where
interest things happen. 

In the case of solution A, I would have to treat unbounded_double in
the same way as plain_double, or refuse it.

Solution B sounds OK for me, although in the current MøB, I would
never send anything out of 0-1. Clamping should take place especially
when inappropriate values would crash the module. Also, when writing
modules, if a value has to be mapped, the two used range limits could
be placed at beginning of the source in clearly labeled constants, so
that experimenting would only be a module recompilation away.

Carlo (Fröhliche Weihnacht)

-- 
  *         Se la Strada e la sua Virtu' non fossero state messe da parte,
* K * Carlo E. Prelz - [email protected]             che bisogno ci sarebbe
  *               di parlare tanto di amore e di rettitudine? (Chuang-Tzu)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.