|
faunus
|
Round and bin numbers for use with tables and histograms. More...
#include <auxiliary.h>
Public Member Functions | |
| Quantize (Tfloat dx, Tfloat xmin=0) | |
| Constructor. More... | |
| Quantize & | operator= (Tfloat val) |
| Assigment operator. | |
| Quantize & | frombin (unsigned int i) |
| Quantize & | operator() (Tfloat val) |
| Assignment with function operator. | |
| template<typename T > | |
| operator T () | |
| Implicit convertion to integral (bin) or float (rounded) | |
Round and bin numbers for use with tables and histograms.
This will round a float to nearest value divisible by dx or convert to an integer corresponding to a binning value. In the latter case, a minimum value must be specified upon construction.
Example:
|
inline |
Constructor.
| dx | resolution |
| xmin | minimum value if converting to integral type (binning) |
1.8.13