#ifndef _SG_PERSPARAM_HXX
#define _SG_PERSPARAM_HXX 1
+#include <simgear/math/sg_random.h>
+
+
template <class T>
class SGPersonalityParameter {
public:
if ( node != 0 ) {
SGPropertyNode_ptr rand_n = node->getNode( "random" );
if ( rand_n != 0 ) {
- _min = rand_n->getDoubleValue( "min", 0.0 );
- _max = rand_n->getDoubleValue( "max", 1.0 );
+ _min = getNodeValue( rand_n, "min", (T)0 );
+ _max = getNodeValue( rand_n, "max", (T)1 );
shuffle();
} else {
_var = _min = _max = getNodeValue( props, name, defval );
T _max;
};
+template <> double
+SGPersonalityParameter<double>::getNodeValue( SGPropertyNode *props,
+ const char *name,
+ double defval ) const;
+
#endif // _SG_PERSPARAM_HXX
+