log2

( <-- Back to Sporkl Function Library )


float log2 ( float val )


Calculates the base-2 logarithm of a number.



Arguments:

val:
Number to calculate the logarithm of

Returns:

Base-2 logarithm of val.

Notes:

val must be greater than zero, otherwise an error with be generated.









sporkforge