C# Class LeopotamGroup.Math.MathExtensions

Math extensions.
Afficher le fichier Open project: Leopotam/LeopotamGroupLibraryUnity

Méthodes publiques

Свойство Type Description
UnifiedNumberFormat System.Globalization.NumberFormatInfo

Méthodes publiques

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

Convert string to float.
public static ToFloat ( this text ) : float
text this Source string.
Résultat float

ToFloatUnchecked() public static méthode

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

ToStringFast() public static méthode

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

ToStringWithSuffix() public static méthode

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

Property Details

UnifiedNumberFormat public_oe static_oe property

Unified NumberFormatInfo.
public static NumberFormatInfo,System.Globalization UnifiedNumberFormat
Résultat System.Globalization.NumberFormatInfo