C# Класс RobustArithmetic.Test.Util.DoubleConverter

A class to allow the conversion of doubles to string representations of their exact decimal values. The implementation aims for readability over efficiency.
Показать файл Открыть проект

Открытые методы

Метод Описание
FromFloatingPointBinaryString ( string s ) : double

Parses a floating point binary string into a double.

Repeat ( this c, int times ) : string

Repeat a character a number of times

ToExactString ( this d ) : string

Converts the given double to a string representation of its exact decimal value. This procedure (and ArbitraryDecimal) from Jon Skeet! here: http://www.yoda.arachsys.com/csharp/DoubleConverter.cs

ToFloatingPointBinaryString ( this d ) : string

Formats a double as a floating point binary string, e.g. 0.25 -> 0.01

Описание методов

FromFloatingPointBinaryString() публичный статический Метод

Parses a floating point binary string into a double.
public static FromFloatingPointBinaryString ( string s ) : double
s string
Результат double

Repeat() публичный статический Метод

Repeat a character a number of times
public static Repeat ( this c, int times ) : string
c this
times int
Результат string

ToExactString() публичный статический Метод

Converts the given double to a string representation of its exact decimal value. This procedure (and ArbitraryDecimal) from Jon Skeet! here: http://www.yoda.arachsys.com/csharp/DoubleConverter.cs
public static ToExactString ( this d ) : string
d this The double to convert.
Результат string

ToFloatingPointBinaryString() публичный статический Метод

Formats a double as a floating point binary string, e.g. 0.25 -> 0.01
public static ToFloatingPointBinaryString ( this d ) : string
d this
Результат string