Norman Vine wrote:
This is the poor man's version taken from sg_inlines.h// normalize a value to lie between min and max template <class T> inline void SG_NORMALIZE_RANGE( T &val, const T min, const T max ) { T step = max - min; while( val >= max ) val -= step; while( val < min ) val += step; };
That's effectively what we have (or had).
A proper version needs to be based on Interval Arithmetic we could just snag a subset of the scalar functions from an existing package http://www.ti3.tu-harburg.de/~knueppel/profil/docu/Profil.texinfo_19.htmlEr ... we are not trying to do arithmetic on intervals. We are just incrementing and decrementing a scaler value within an interval.
- Julian
_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel