com::cosylab::gui::components::r2::chart::accessories::RoundDoubleToDouble Class Reference

List of all members.

Public Member Functions

 RoundDoubleToDouble ()

Static Public Member Functions

static double roundToDigits (double number, double formatNumberForRounding, int numberOfDigits) throws IllegalArgumentException
static double roundToDigits (double number, int numberOfDigits) throws IllegalArgumentException
static double roundUpToDigits (double number, double formatNumberForRounding, int numberOfDigits) throws IllegalArgumentException
static double roundUpToDigits (double number, int numberOfDigits) throws IllegalArgumentException
static double roundUpToTenth (double number)
static double truncToDigits (double number, double formatNumberForRounding, int numberOfDigits) throws IllegalArgumentException
static double truncToDigits (double number, int numberOfDigits) throws IllegalArgumentException
static double truncToTenth (double number)

Detailed Description

This type is to round double type. It cut off a few less significant digits.


Constructor & Destructor Documentation

com::cosylab::gui::components::r2::chart::accessories::RoundDoubleToDouble::RoundDoubleToDouble (  )  [inline]

RoundDoubleToDouble constructor comment.


Member Function Documentation

static double com::cosylab::gui::components::r2::chart::accessories::RoundDoubleToDouble::roundToDigits ( double  number,
int  numberOfDigits 
) throws IllegalArgumentException [inline, static]

This method not just cut off parameter specified number of less significant digits. It adds 1 to last not-cut digit if most significant cut digits was 5 or greater.

Returns:
double
Parameters:
number double
numberOfDigits int
static double com::cosylab::gui::components::r2::chart::accessories::RoundDoubleToDouble::roundToDigits ( double  number,
double  formatNumberForRounding,
int  numberOfDigits 
) throws IllegalArgumentException [inline, static]

This method round number in this manner that digits that represent the same order as formatNumberForRounding are rounded as method roundToDigits(double, int) do it.

roundToDigits(123456,123,1) return 123500 roundToDigits(123416,123,1) return 123400

Returns:
double
Parameters:
number double
numberOfDigits int
formatNumberForRounding double
static double com::cosylab::gui::components::r2::chart::accessories::RoundDoubleToDouble::roundUpToDigits ( double  number,
int  numberOfDigits 
) throws IllegalArgumentException [inline, static]

This method not just cut off parameter specified number of less significant digits. Rounded value is equall or greather than old value.

Returns:
double
Parameters:
number double
numberOfDigits int
static double com::cosylab::gui::components::r2::chart::accessories::RoundDoubleToDouble::roundUpToDigits ( double  number,
double  formatNumberForRounding,
int  numberOfDigits 
) throws IllegalArgumentException [inline, static]

This method round number in this manner that digits that represent the same order as formatNumberForRounding are rounded as method roundUpToDigits(double, int) do it.

roundToDigits(123456,123,1) return 123500 roundToDigits(123416,123,1) return 123500

Returns:
double
Parameters:
number double
numberOfDigits int
formatNumberForRounding double
static double com::cosylab::gui::components::r2::chart::accessories::RoundDoubleToDouble::roundUpToTenth ( double  number  )  [inline, static]

This method round parameter specified number to power of ten, which is first, greather than it.

static double com::cosylab::gui::components::r2::chart::accessories::RoundDoubleToDouble::truncToDigits ( double  number,
int  numberOfDigits 
) throws IllegalArgumentException [inline, static]

This method just cut off parameter specified number of less significant digits.

Returns:
double
Parameters:
number double
numberOfDigits int
static double com::cosylab::gui::components::r2::chart::accessories::RoundDoubleToDouble::truncToDigits ( double  number,
double  formatNumberForRounding,
int  numberOfDigits 
) throws IllegalArgumentException [inline, static]

This method round number in this manner that digits that represent the same order as formatNumberForRounding are rounded as method roundUpToDigits(double, int) do it.

roundToDigits(123456,123,1) return 123400 roundToDigits(123416,123,1) return 123400

Returns:
double
Parameters:
number double
numberOfDigits int
formatNumberForRounding double
static double com::cosylab::gui::components::r2::chart::accessories::RoundDoubleToDouble::truncToTenth ( double  number  )  [inline, static]

This method round parameter specified number to power of ten, which is first, lower than it.


The documentation for this class was generated from the following file:

Generated by  doxygen 1.6.2