struct float
Represents a single-precision floating-point number.
public int CompareTo( object value )
Compares this instance to a specified object and returns an integer that indicates whether the value of this instance is less than, equal to, or greater than the value of the specified object.
valueAn object to compare, or .- Returns A signed number indicating the relative values of this instance and . Return Value Description Less than zero This instance is less than . -or- This instance is not a number () and is a number. Zero This instance is equal to . -or- This instance and value are both not a number (), , or . Greater than zero This instance is greater than . -or- This instance is a number and is not a number (). -or- is .
public int CompareTo( float value )
Compares this instance to a specified single-precision floating-point number and returns an integer that indicates whether the value of this instance is less than, equal to, or greater than the value of the specified single-precision floating-point number.
valueA single-precision floating-point number to compare.- Returns A signed number indicating the relative values of this instance and . Return Value Description Less than zero This instance is less than . -or- This instance is not a number () and is a number. Zero This instance is equal to . -or- Both this instance and are not a number (), , or . Greater than zero This instance is greater than . -or- This instance is a number and is not a number ().
public static float Epsilon
Represents the smallest positive value that is greater than zero. This field is constant.
public bool Equals( object obj )
Returns a value indicating whether this instance is equal to a specified object.
objAn object to compare with this instance.- Returns if is an instance of and equals the value of this instance; otherwise, .
public bool Equals( float obj )
Returns a value indicating whether this instance and a specified object represent the same value.
objAn object to compare with this instance.- Returns if is equal to this instance; otherwise, .
public static bool IsFinite( float f )
Determines whether the specified value is finite (zero, subnormal or normal).
fA single-precision floating-point number.- Returns if the specified value is finite (zero, subnormal or normal); otherwise, .
public static bool IsInfinity( float f )
Returns a value indicating whether the specified number evaluates to negative or positive infinity.
fA single-precision floating-point number.- Returns if evaluates to or ; otherwise, .
public static bool IsNaN( float f )
Returns a value that indicates whether the specified value is not a number ().
fA single-precision floating-point number.- Returns if evaluates to not a number (); otherwise, .
public static bool IsNegative( float f )
Determines whether the specified value is negative.
fA single-precision floating-point number.- Returns if negative, otherwise.
public static bool IsNegativeInfinity( float f )
Returns a value indicating whether the specified number evaluates to negative infinity.
fA single-precision floating-point number.- Returns if evaluates to ; otherwise, .
public static bool IsNormal( float f )
Determines whether the specified value is normal.
fA single-precision floating-point number.- Returns if is normal; otherwise.
public static bool IsPositiveInfinity( float f )
Returns a value indicating whether the specified number evaluates to positive infinity.
fA single-precision floating-point number.- Returns if evaluates to ; otherwise, .
public static bool IsSubnormal( float f )
Determines whether the specified value is subnormal.
fA single-precision floating-point number.- Returns if is subnormal; otherwise.
public static float MaxValue
Represents the largest possible value of . This field is constant.
public static float MinValue
Represents the smallest possible value of . This field is constant.
public static float NaN
Represents not a number (). This field is constant.
public static float NegativeInfinity
Represents negative infinity. This field is constant.
public static bool op_Equality( float left, float right )
Returns a value that indicates whether two specified values are equal.
leftThe first value to compare.rightThe second value to compare.- Returns if and are equal; otherwise, .
public static bool op_GreaterThan( float left, float right )
Returns a value that indicates whether a specified value is greater than another specified value.
leftThe first value to compare.rightThe second value to compare.- Returns if is greater than ; otherwise, .
public static bool op_GreaterThanOrEqual( float left, float right )
Returns a value that indicates whether a specified value is greater than or equal to another specified value.
leftThe first value to compare.rightThe second value to compare.- Returns if is greater than or equal to ; otherwise, .
public static bool op_Inequality( float left, float right )
Returns a value that indicates whether two specified values are not equal.
leftThe first value to compare.rightThe second value to compare.- Returns if and are not equal; otherwise, .
public static bool op_LessThan( float left, float right )
Returns a value that indicates whether a specified value is less than another specified value.
leftThe first value to compare.rightThe second value to compare.- Returns if is less than ; otherwise, .
public static bool op_LessThanOrEqual( float left, float right )
Returns a value that indicates whether a specified value is less than or equal to another specified value.
leftThe first value to compare.rightThe second value to compare.- Returns if is less than or equal to ; otherwise, .
public static float Parse( string s )
Converts the string representation of a number to its single-precision floating-point number equivalent.
sA string that contains a number to convert.- Returns A single-precision floating-point number equivalent to the numeric value or symbol specified in .
public static float Parse( string s, NumberStyles style )
Converts the string representation of a number in a specified style to its single-precision floating-point number equivalent.
sA string that contains a number to convert.styleA bitwise combination of enumeration values that indicates the style elements that can be present in . A typical value to specify is combined with .- Returns A single-precision floating-point number that is equivalent to the numeric value or symbol specified in .
public static float Parse( string s, NumberStyles style, IFormatProvider provider )
Converts the string representation of a number in a specified style and culture-specific format to its single-precision floating-point number equivalent.
sA string that contains a number to convert.styleA bitwise combination of enumeration values that indicates the style elements that can be present in . A typical value to specify is combined with .providerAn object that supplies culture-specific formatting information about .- Returns A single-precision floating-point number equivalent to the numeric value or symbol specified in .
public static float Parse( string s, IFormatProvider provider )
Converts the string representation of a number in a specified culture-specific format to its single-precision floating-point number equivalent.
sA string that contains a number to convert.providerAn object that supplies culture-specific formatting information about .- Returns A single-precision floating-point number equivalent to the numeric value or symbol specified in .
public static float PositiveInfinity
Represents positive infinity. This field is constant.
public string ToString( IFormatProvider provider )
Converts the numeric value of this instance to its equivalent string representation using the specified culture-specific format information.
providerAn object that supplies culture-specific formatting information.- Returns The string representation of the value of this instance as specified by .
public string ToString( string format )
Converts the numeric value of this instance to its equivalent string representation, using the specified format.
formatA numeric format string.- Returns The string representation of the value of this instance as specified by .
public string ToString( string format, IFormatProvider provider )
Converts the numeric value of this instance to its equivalent string representation using the specified format and culture-specific format information.
formatA numeric format string.providerAn object that supplies culture-specific formatting information.- Returns The string representation of the value of this instance as specified by and .
public static bool TryParse( string s, NumberStyles style, IFormatProvider provider, ref float result )
Converts the string representation of a number in a specified style and culture-specific format to its single-precision floating-point number equivalent. A return value indicates whether the conversion succeeded or failed.
sA string representing a number to convert.styleA bitwise combination of enumeration values that indicates the permitted format of . A typical value to specify is combined with .providerAn object that supplies culture-specific formatting information about .resultWhen this method returns, contains the single-precision floating-point number equivalent to the numeric value or symbol contained in , if the conversion succeeded, or zero if the conversion failed. The conversion fails if the parameter is or , is not in a format compliant with , represents a number less than or greater than , or if is not a valid combination of enumerated constants. This parameter is passed uninitialized; any value originally supplied in will be overwritten.- Returns if was converted successfully; otherwise, .
public static bool TryParse( string s, ref float result )
Converts the string representation of a number to its single-precision floating-point number equivalent. A return value indicates whether the conversion succeeded or failed.
sA string representing a number to convert.resultWhen this method returns, contains single-precision floating-point number equivalent to the numeric value or symbol contained in , if the conversion succeeded, or zero if the conversion failed. The conversion fails if the parameter is or , is not a number in a valid format, or represents a number less than or greater than . This parameter is passed uninitialized; any value originally supplied in will be overwritten.- Returns if was converted successfully; otherwise, .
public static bool TryParse( ReadOnlySpan<char> s, IFormatProvider provider, ref float result )
😔 No documentation found.
public static float Sqrt( float x )
😔 No documentation found.
public static float RootN( float x, int n )
😔 No documentation found.
public static float Hypot( float x, float y )
😔 No documentation found.
public static float Cbrt( float x )
😔 No documentation found.
public static float Pow( float x, float y )
😔 No documentation found.
public static bool TryParse( string s, IFormatProvider provider, ref float result )
😔 No documentation found.
public static float MultiplyAddEstimate( float left, float right, float addend )
😔 No documentation found.
public static float MinMagnitudeNumber( float x, float y )
😔 No documentation found.
public static float MinMagnitude( float x, float y )
😔 No documentation found.
public static bool IsPositive( float value )
😔 No documentation found.
public static float MaxMagnitude( float x, float y )
😔 No documentation found.
public static bool IsRealNumber( float value )
😔 No documentation found.
public static bool IsOddInteger( float value )
😔 No documentation found.
public static bool IsInteger( float value )
😔 No documentation found.
public static bool IsEvenInteger( float value )
😔 No documentation found.
public static float CreateTruncating( TOther value )
😔 No documentation found.
public static float CreateSaturating( TOther value )
😔 No documentation found.
public static float Abs( float value )
😔 No documentation found.
public static float CreateChecked( TOther value )
😔 No documentation found.
public static float MaxMagnitudeNumber( float x, float y )
😔 No documentation found.
public static float Parse( ReadOnlySpan<char> s, IFormatProvider provider )
😔 No documentation found.
public static float MinNumber( float x, float y )
😔 No documentation found.
public static float Parse( ReadOnlySpan<byte> utf8Text, NumberStyles style = AllowThousands, Float, IFormatProvider provider = null )
😔 No documentation found.
public static float E
😔 No documentation found.
public static float NegativeZero
😔 No documentation found.
public Type GetType( )
😔 No documentation found.
public static bool TryParse( ReadOnlySpan<byte> utf8Text, IFormatProvider provider, ref float result )
😔 No documentation found.
public static float Parse( ReadOnlySpan<byte> utf8Text, IFormatProvider provider )
😔 No documentation found.
public static bool TryParse( ReadOnlySpan<byte> utf8Text, NumberStyles style, IFormatProvider provider, ref float result )
😔 No documentation found.
public static int Sign( float value )
😔 No documentation found.
public static float TanPi( float x )
😔 No documentation found.
public static float Tan( float x )
😔 No documentation found.
public static float SinPi( float x )
😔 No documentation found.
public static ValueTuple<float,float> SinCosPi( float x )
😔 No documentation found.
public static ValueTuple<float,float> SinCos( float x )
😔 No documentation found.
public static float Sin( float x )
😔 No documentation found.
public static float RadiansToDegrees( float radians )
😔 No documentation found.
public static float DegreesToRadians( float degrees )
😔 No documentation found.
public static float CosPi( float x )
😔 No documentation found.
public static float Cos( float x )
😔 No documentation found.
public static float AtanPi( float x )
😔 No documentation found.
public static float Atan( float x )
😔 No documentation found.
public static float AsinPi( float x )
😔 No documentation found.
public static float Asin( float x )
😔 No documentation found.
public static float Acos( float x )
😔 No documentation found.
public static float AcosPi( float x )
😔 No documentation found.
public static float Tau
😔 No documentation found.
public static float Min( float x, float y )
😔 No documentation found.
public static float Round( float x, MidpointRounding mode )
😔 No documentation found.
public static float Round( float x, int digits )
😔 No documentation found.
public static float Round( float x )
😔 No documentation found.
public static float Floor( float x )
😔 No documentation found.
public static TInteger ConvertToIntegerNative( float value )
😔 No documentation found.
public static TInteger ConvertToInteger( float value )
😔 No documentation found.
public static float Ceiling( float x )
😔 No documentation found.
public static float Exp10M1( float x )
😔 No documentation found.
public static float Exp10( float x )
😔 No documentation found.
public static float Exp2M1( float x )
😔 No documentation found.
public static float Exp2( float x )
😔 No documentation found.
public static float Round( float x, int digits, MidpointRounding mode )
😔 No documentation found.
public static float ExpM1( float x )
😔 No documentation found.
public static float Log2( float value )
😔 No documentation found.
public static bool IsPow2( float value )
😔 No documentation found.
public TypeCode GetTypeCode( )
😔 No documentation found.
public static bool TryParse( ReadOnlySpan<char> s, NumberStyles style, IFormatProvider provider, ref float result )
😔 No documentation found.
public static bool TryParse( ReadOnlySpan<byte> utf8Text, ref float result )
😔 No documentation found.
public static bool TryParse( ReadOnlySpan<char> s, ref float result )
😔 No documentation found.
public static float Parse( ReadOnlySpan<char> s, NumberStyles style = AllowThousands, Float, IFormatProvider provider = null )
😔 No documentation found.
public bool TryFormat( Span<byte> utf8Destination, ref int bytesWritten, ReadOnlySpan<char> format = null, IFormatProvider provider = null )
😔 No documentation found.
public bool TryFormat( Span<char> destination, ref int charsWritten, ReadOnlySpan<char> format = null, IFormatProvider provider = null )
😔 No documentation found.
public string ToString( )
😔 No documentation found.
public int GetHashCode( )
😔 No documentation found.
public static float Exp( float x )
😔 No documentation found.
public static float Cosh( float x )
😔 No documentation found.
public static float Truncate( float x )
😔 No documentation found.
public static float MaxNumber( float x, float y )
😔 No documentation found.
public static float Max( float x, float y )
😔 No documentation found.
public static float CopySign( float value, float sign )
😔 No documentation found.
public static float Clamp( float value, float min, float max )
😔 No documentation found.
public static float Log10P1( float x )
😔 No documentation found.
public static float Log2P1( float x )
😔 No documentation found.
public static float Log10( float x )
😔 No documentation found.
public static float LogP1( float x )
😔 No documentation found.
public static float Log( float x, float newBase )
😔 No documentation found.
public static float Log( float x )
😔 No documentation found.
public static float Tanh( float x )
😔 No documentation found.
public static float Sinh( float x )
😔 No documentation found.
public static float Atan2( float y, float x )
😔 No documentation found.
public static float Pi
😔 No documentation found.
public static float Asinh( float x )
😔 No documentation found.
public static float Acosh( float x )
😔 No documentation found.
public static float ScaleB( float x, int n )
😔 No documentation found.
public static float ReciprocalSqrtEstimate( float x )
😔 No documentation found.
public static float ReciprocalEstimate( float x )
😔 No documentation found.
public static float Lerp( float value1, float value2, float amount )
😔 No documentation found.
public static int ILogB( float x )
😔 No documentation found.
public static float Ieee754Remainder( float left, float right )
😔 No documentation found.
public static float FusedMultiplyAdd( float left, float right, float addend )
😔 No documentation found.
public static float BitIncrement( float x )
😔 No documentation found.
public static float BitDecrement( float x )
😔 No documentation found.
public static float Atanh( float x )
😔 No documentation found.
public static float Atan2Pi( float y, float x )
😔 No documentation found.