C# Class 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.
Afficher le fichier Open project: govert/RobustGeometry.NET

Méthodes publiques

Méthode Description
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

Method Details

FromFloatingPointBinaryString() public static méthode

Parses a floating point binary string into a double.
public static FromFloatingPointBinaryString ( string s ) : double
s string
Résultat double

Repeat() public static méthode

Repeat a character a number of times
public static Repeat ( this c, int times ) : string
c this
times int
Résultat string

ToExactString() public static méthode

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.
Résultat string

ToFloatingPointBinaryString() public static méthode

Formats a double as a floating point binary string, e.g. 0.25 -> 0.01
public static ToFloatingPointBinaryString ( this d ) : string
d this
Résultat string