Log2

From Bennu Wiki
Revision as of 02:05, 2 October 2008 by Sandman (talk | contribs) (1 revision)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


Up to Log.dll functions



Definition

FLOAT log2 ( <FLOAT n> )

Returns a logarithm of number n with base 2.

Parameters

FLOAT n - The number that will be used for the logarithm.

Returns

FLOAT : The logarithm of n with base 2.

Example

Import "log.dll";

Global
    float logarithm=0.0;
End

Process main()
Begin
    write_float(0,160,100,4,&logarithm);
	
    While(not(key(_esc)))
        If (key(_1)) logarithm=log2(1024); End 

        Frame;
    End
End

Used in example: import, write_float(), key(), log2()


Log.DLL Functions
Ln()Log()Log2()