Modifier

Partager via


Functions.InverseSqrtFast Method

Definition

Overloads

InverseSqrtFast(Double)

Returns an approximation of the inverse square root of left number.

InverseSqrtFast(Single)

Returns an approximation of the inverse square root of left number.

InverseSqrtFast(Double)

Returns an approximation of the inverse square root of left number.

public static double InverseSqrtFast (double x);
static member InverseSqrtFast : double -> double

Parameters

x
Double

A number.

Returns

An approximation of the inverse square root of the specified number, with an upper error bound of 0.001

Remarks

This is an improved implementation of the the method known as Carmack's inverse square root which is found in the Quake III source code. This implementation comes from https://web.archive.org/web/20090721113754/http://www.codemaestro.com/reviews/9. For the history of this method, see https://www.beyond3d.com/content/articles/8/.

Applies to

InverseSqrtFast(Single)

Returns an approximation of the inverse square root of left number.

public static float InverseSqrtFast (float x);
static member InverseSqrtFast : single -> single

Parameters

x
Single

A number.

Returns

An approximation of the inverse square root of the specified number, with an upper error bound of 0.001

Remarks

This is an improved implementation of the the method known as Carmack's inverse square root which is found in the Quake III source code. This implementation comes from https://web.archive.org/web/20090721113754/http://www.codemaestro.com/reviews/9. For the history of this method, see https://www.beyond3d.com/content/articles/8/.

Applies to