C# Class RobustArithmetic.Test.Util.DoubleConverter.ArbitraryDecimal

Private class used for manipulating deciaml strings. From the Jon Skeet! example.
ファイルを表示 Open project: govert/RobustGeometry.NET

Public Methods

Method Description
ToString ( ) : String

Converts the value to a proper decimal string representation.

Private Methods

Method Description
ArbitraryDecimal ( long x ) : System

Constructs an arbitrary decimal expansion from the given long. The long must not be negative.

MultiplyBy ( int amount ) : void

Multiplies the current expansion by the given amount, which should only be 2 or 5.

Normalize ( ) : void

Removes leading/trailing zeroes from the expansion.

Shift ( int amount ) : void

Shifts the decimal point; a negative value makes the decimal expansion bigger (as fewer digits come after the decimal place) and a positive value makes the decimal expansion smaller.

Method Details

ToString() public method

Converts the value to a proper decimal string representation.
public ToString ( ) : String
return String