GRASS GIS 7 Programmer's Manual  7.5.svn(2018)-r72115
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
max_pow2.c File Reference
#include <grass/gis.h>
#include <grass/gmath.h>
Include dependency graph for max_pow2.c:

Go to the source code of this file.

Functions

long G_math_max_pow2 (const long n)
 Finds least power of 2 >= n More...
 
long G_math_min_pow2 (const long n)
 Finds largest power of 2 <= n More...
 

Function Documentation

long G_math_max_pow2 ( const long  n)

Finds least power of 2 >= n

Finds least power of 2 >= n.

Parameters
[in]n
Returns
long

Definition at line 16 of file max_pow2.c.

long G_math_min_pow2 ( const long  n)

Finds largest power of 2 <= n

Finds largest power of 2 <= n.

Parameters
[in]n
Returns
long

Definition at line 44 of file max_pow2.c.