Misc. Mathematics

Some other useful maths functions…..

inline double JSL::FractionBounder(double a)

A useful function when one knows a value needs to be between 0 and 1.

Parameters:

a – The value to be tested

Returns:

min(max(0,a),1), i.e., if 0