Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

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

List of all members.

Public Member Functions

 RoundDoubleToDouble ()

Static Public Member Functions

double roundToDigits (double number, double formatNumberForRounding, int numberOfDigits) throws IllegalArgumentException
double roundToDigits (double number, int numberOfDigits) throws IllegalArgumentException
double roundUpToDigits (double number, double formatNumberForRounding, int numberOfDigits) throws IllegalArgumentException
double roundUpToDigits (double number, int numberOfDigits) throws IllegalArgumentException
double roundUpToTenth (double number)
double truncToDigits (double number, double formatNumberForRounding, int numberOfDigits) throws IllegalArgumentException
double truncToDigits (double number, int numberOfDigits) throws IllegalArgumentException
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

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

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

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

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

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.

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

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

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 on Thu Apr 30 03:12:59 2009 for ACS Java API by doxygen 1.3.8