Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


sqrt

Returns the square root of a float value.
Read time 1 minuteLast updated 9 days ago

Definition

sqrt(float)

Returns the square root of a float value.
public static float sqrt(float x)

Parameters

Value to use when computing square root.

Returns

Type

Description

floatThe square root.

sqrt(float2)

Returns the componentwise square root of a float2 vector.
public static float2 sqrt(float2 x)

Parameters

Value to use when computing square root.

Returns

Type

Description

float2The componentwise square root.

sqrt(float3)

Returns the componentwise square root of a float3 vector.
public static float3 sqrt(float3 x)

Parameters

Value to use when computing square root.

Returns

Type

Description

float3The componentwise square root.

sqrt(float4)

Returns the componentwise square root of a float4 vector.
public static float4 sqrt(float4 x)

Parameters

Value to use when computing square root.

Returns

Type

Description

float4The componentwise square root.

sqrt(double)

Returns the square root of a double value.
public static double sqrt(double x)

Parameters

Value to use when computing square root.

Returns

Type

Description

doubleThe square root.

sqrt(double2)

Returns the componentwise square root of a double2 vector.
public static double2 sqrt(double2 x)

Parameters

Value to use when computing square root.

Returns

Type

Description

double2The componentwise square root.

sqrt(double3)

Returns the componentwise square root of a double3 vector.
public static double3 sqrt(double3 x)

Parameters

Value to use when computing square root.

Returns

Type

Description

double3The componentwise square root.

sqrt(double4)

Returns the componentwise square root of a double4 vector.
public static double4 sqrt(double4 x)

Parameters

Value to use when computing square root.

Returns

Type

Description

double4The componentwise square root.