sqrti


Description:


public int sqrti (int x)

Very fast fixed point implementation of square root for integers.

This function is at least 6x faster than clib sqrt on x86, and (this is not a typo!) about 500x faster on ARM without FPU. It's error is less than 5% for arguments smaller than SQRTI_ARG_5_PERCENT and less than 10% for narguments smaller than SQRTI_ARG_10_PERCENT. The maximum argument that can be passed to this function is SQRTI_ARG_MAX.

Parameters:

x

integer value

Returns:

integer square root.


Namespace: Cogl
Package: cogl-1.0



2022 vala-language.org