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.
파일 보기 프로젝트 열기: govert/RobustGeometry.NET

공개 메소드들

메소드 설명
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