rsqrt()
Purpose
Find the fast inverse square root of the specfied number
Description
Returns the reciprocal (or multiplicative inverse) of the square root of a number. This operation is used in digital signal processing to normalize a vector (scale it to length 1.) e.g. in computer graphics inverse square roots are used to compute angles of incidence and reflection for lighting and shading.
Syntax
result = rsqrt( number )
Arguments
number The number to find the reciprocal square root of
result The reciprocal square root (1/square root) of the number
Example
num = 10
print( rsqrt( num ) )
update()
sleep( 3 )
Associated Commands