GRASS GIS 8 Programmer's Manual 8.3.2(2024)-exported
Loading...
Searching...
No Matches
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
 
long G_math_min_pow2 (const long n)
 Finds largest power of 2 <= n
 

Function Documentation

◆ G_math_max_pow2()

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 15 of file max_pow2.c.

◆ G_math_min_pow2()

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 42 of file max_pow2.c.