Compartilhar via


BigDecimal.FloatValue Method

Definition

Converts this BigDecimal to a float.

[Android.Runtime.Register("floatValue", "()F", "GetFloatValueHandler")]
public override float FloatValue ();
[<Android.Runtime.Register("floatValue", "()F", "GetFloatValueHandler")>]
override this.FloatValue : unit -> single

Returns

this BigDecimal converted to a float.

Attributes

Remarks

Converts this BigDecimal to a float. This conversion is similar to the narrowing primitive conversion from double to float as defined in <cite>The Java Language Specification</cite>: if this BigDecimal has too great a magnitude to represent as a float, it will be converted to Float#NEGATIVE_INFINITY or Float#POSITIVE_INFINITY as appropriate. Note that even when the return value is finite, this conversion can lose information about the precision of the BigDecimal value.

Java documentation for java.math.BigDecimal.floatValue().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to