Sqrt - returns square root of scalars and vectors.
vector1 sqrt(vector1 a); vector2 sqrt(vector2 a); vector3 sqrt(vector3 a); vector4 sqrt(vector4 a);
- Vector or scalar of which to determine the square root.
Returns the square root of a.
For vectors, the returned vector contains the square root of each element of the input vector. The square root of zero is zero. Ideally, the square root of negative values returns NaN (Not a Number). sqrt is often implemented as the reciprocal of a reciporcal squrare root approximation in older profiles.