C# Class LeopotamGroup.Math.MathExtensions

Math extensions.
ファイルを表示 Open project: Leopotam/LeopotamGroupLibraryUnity

Public Properties

Property Type Description
UnifiedNumberFormat System.Globalization.NumberFormatInfo

Public Methods

Method Description
ToFloat ( this text ) : float

Convert string to float.

ToFloatUnchecked ( this text ) : float

Fast convert string to float. Fast, no GC allocation, no support for scientific format.

ToStringFast ( this data ) : string

Convert float number to string. Fast, no support for scientific format.

ToStringWithSuffix ( this data, int digitsAfterPoint = 2 ) : string

Convert number to string with "kilo-million-billion" suffix with rounding.

Method Details

ToFloat() public static method

Convert string to float.
public static ToFloat ( this text ) : float
text this Source string.
return float

ToFloatUnchecked() public static method

Fast convert string to float. Fast, no GC allocation, no support for scientific format.
public static ToFloatUnchecked ( this text ) : float
text this Raw string.
return float

ToStringFast() public static method

Convert float number to string. Fast, no support for scientific format.
public static ToStringFast ( this data ) : string
data this Data.
return string

ToStringWithSuffix() public static method

Convert number to string with "kilo-million-billion" suffix with rounding.
public static ToStringWithSuffix ( this data, int digitsAfterPoint = 2 ) : string
data this Source number.
digitsAfterPoint int Digits after floating point.
return string

Property Details

UnifiedNumberFormat public_oe static_oe property

Unified NumberFormatInfo.
public static NumberFormatInfo,System.Globalization UnifiedNumberFormat
return System.Globalization.NumberFormatInfo