Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

qwt_math.h File Reference

A set of mathematical routines. More...

Include dependency graph for qwt_math.h:

Include dependency graph

Defines

#define LOG10_2   0.30102999566398119802
#define LOG10_3   0.47712125471966243540
#define LOG10_5   0.69897000433601885749
#define M_2PI   6.28318530717958623200
#define LOG_MIN   1.0e-100
#define LOG_MAX   1.0e100

Functions

template<classT> const T& qwtMax (const T& x, const T& y)
template<classT> const T& qwtMin ( const T& x, const T& y)
template<classT> T qwtAbs (const T& x)
template<classT> int qwtSign (const T& x)
template<classT> T qwtSqr (const T&x)
template<classT> void qwtCopyArray (T *dest, T *src, int n)
template<classT> void qwtShiftArray (T *arr, int size, int di)
template<classT> void qwtSwap ( T &x1, T& x2)
int qwtInt (double x)
template<classT> void qwtSort (const T& x1, const T& x2, T& xmin, T& xmax)
template<classT> void qwtSort (T& x1, T& x2)
template<classT> T qwtLim (const T& x, const T& x1, const T& x2)

Detailed Description

A set of mathematical routines.


Function Documentation

template<classT>
T qwtAbs ( const T & x )
 

Return the absolute value.

template<classT>
void qwtCopyArray ( T * dest,
T * src,
int n )
 

Copy an array into another.

Parameters:
dest   Destination
src   Source
n   Number of elements

int qwtInt ( double x )
 

Round a number to the nearest integer.

template<classT>
T qwtLim ( const T & x,
const T & x1,
const T & x2 )
 

Limit a value to fit into a specified interval.

Parameters:
x   Input value
x1   First interval boundary
x2   Second interval boundary

template<classT>
const T & qwtMax ( const T & x,
const T & y )
 

Return the largest of two values.

template<classT>
const T & qwtMin ( const T & x,
const T & y )
 

Return the smallest of two values.

template<classT>
void qwtShiftArray ( T * arr,
int size,
int di )
 

Shift an array by a specified number of positions.

Parameters:
arr   Pointer to an array
size   Number of elements
di   Number of positions. A positive number shifts right, a negative number shifts left.

template<classT>
int qwtSign ( const T & x )
 

Return the sign.

template<classT>
void qwtSort ( T & x1,
T & x2 )
 

Sort two values in ascending order.

template<classT>
void qwtSort ( const T & x1,
const T & x2,
T & xmin,
T & xmax )
 

Sort two values in ascending order.

Parameters:
x1   First input value
x2   Second input value
xmax   Greater value
xmin   Smaller value

template<classT>
T qwtSqr ( const T & x )
 

Return the square of a number.

template<classT>
void qwtSwap ( T & x1,
T & x2 )
 

Swap two values.


Generated at Thu Dec 14 00:27:12 2000 for Qwt User's Guide by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000