Main Page   Modules   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages   Examples  

math/round.h File Reference

Numerical Rounding Routines. More...

#include <glt/config.h>
#include <cmath>

Include dependency graph for round.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Functions

float round (const float value, const int precision=0)
 rounds value to a specified precision

double round (const double value, const int precision=0)
 rounds value to a specified precision


Detailed Description

Numerical Rounding Routines.

Definition in file round.h.


Function Documentation

float round const float    value,
const int    precision = 0
 

rounds value to a specified precision

Author:
Stefan Greuter
Parameters:
value  float to be rounded
precision  desired precision
Returns:
rounded float value
Note:
precision must be non-negative
Returns the rounded value of 'value' to the specified 'precision' (number of digits after the decimal point). The must be a positive integer value.

Definition at line 13 of file round.cpp.

References round().

double round const double    value,
const int    precision = 0
 

rounds value to a specified precision

Author:
Stefan Greuter
Parameters:
value  float to be rounded
precision  desired precision
Returns:
rounded float value
Note:
precision must be non-negative
Returns the rounded value of 'value' to the specified 'precision' (number of digits after the decimal point). The must be a positive integer value.

Definition at line 22 of file round.cpp.

Referenced by round().


Generated on Tue Nov 5 11:11:26 2002 for GLT by doxygen1.2.18