code::Arith Struct Reference

List of all members.

Detailed Description

Convenience math operations.

Author:
: Lakshman
Version:
:
Id
code_Arith.h,v 1.15 2009/06/02 20:17:38 lakshman Exp


Static Public Member Functions

static int roundOff (double n)
 Round the given number to the nearest integer.
static double roundOff (double n, double incr)
 Round the given number to the nearest increment.
static bool feq (double n1, double n2, double accuracy=1.0E-05)
 Compare doubles to within a certain accuracy.
static int compare (double a, float b, double accuracy=1.0E-05)
 Return a number less than, equal to, or greater than zero if a is less than, equal to, or greater than b.


Member Function Documentation

static int code::Arith::compare ( double  a,
float  b,
double  accuracy = 1.0E-05 
) [inline, static]

Return a number less than, equal to, or greater than zero if a is less than, equal to, or greater than b.

static bool code::Arith::feq ( double  n1,
double  n2,
double  accuracy = 1.0E-05 
) [inline, static]

Compare doubles to within a certain accuracy.

static double code::Arith::roundOff ( double  n,
double  incr 
) [inline, static]

Round the given number to the nearest increment.

For example, 3.14159 to the nearest 0.1 is 3.1.

static int code::Arith::roundOff ( double  n  )  [inline, static]

Round the given number to the nearest integer.


Generated on Fri May 4 13:40:12 2012 for WDSS-IIw2 by  doxygen 1.4.7