共用方式為


StrictMath.Sqrt(Double) Method

Definition

Returns the correctly rounded positive square root of a double value.

[Android.Runtime.Register("sqrt", "(D)D", "")]
public static double Sqrt (double a);
[<Android.Runtime.Register("sqrt", "(D)D", "")>]
static member Sqrt : double -> double

Parameters

a
Double

a value.

Returns

the positive square root of a.

Attributes

Remarks

Returns the correctly rounded positive square root of a double value. Special cases: <ul><li>If the argument is NaN or less than zero, then the result is NaN. <li>If the argument is positive infinity, then the result is positive infinity. <li>If the argument is positive zero or negative zero, then the result is the same as the argument.</ul> Otherwise, the result is the double value closest to the true mathematical square root of the argument value.

Java documentation for java.lang.StrictMath.sqrt(double).

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