Miscellaneous utility functions. More...
Go to the source code of this file.
Functions | |
int | min (int a, int b) |
Find the minimum of two int s. | |
int | max (int a, int b) |
Find the maximum of two int s. | |
int | ceil2n (int z) |
Find the next power of two. | |
int | pxbits (const mpfr_t radius, double height) |
Find the precision needed to represent pixel coordinates in an image. | |
void | pixel_coordinate (mpfr_t x, mpfr_t y, int width, int height, const mpfr_t centerx, const mpfr_t centery, const mpfr_t radius, double i, double j) |
Find the coordinates corresponding to a pixel. |
Miscellaneous utility functions.
Definition in file utility.c.
int ceil2n | ( | int | z | ) |
int max | ( | int | a, |
int | b | ||
) |
Find the maximum of two int
s.
a | First number. |
b | Second number. |
Definition at line 31 of file utility.c.
Referenced by find_blobs0(), parse_command_line(), and vram_available().
int min | ( | int | a, |
int | b | ||
) |
Find the minimum of two int
s.
a | First number. |
b | Second number. |
Definition at line 22 of file utility.c.
Referenced by find_blobs0(), and parse_command_line().
void pixel_coordinate | ( | mpfr_t | x, |
mpfr_t | y, | ||
int | width, | ||
int | height, | ||
const mpfr_t | centerx, | ||
const mpfr_t | centery, | ||
const mpfr_t | radius, | ||
double | i, | ||
double | j | ||
) |
Find the coordinates corresponding to a pixel.
x | Output real coordinate. |
y | Output imaginary coordinate. |
width | The image width in pixels. |
height | The image height in pixels. |
centerx | The real coordinate of the view center. |
centery | The imaginary coordinate of the view center. |
radius | The radius of the view. |
i | The pixel x coordinate (0 is left of the image). |
j | The pixel y coordinate (0 is top of the image). |
Definition at line 76 of file utility.c.
Referenced by find_ref(), fpxx_start(), interact_coord(), interact_translate(), and tiling_next().
int pxbits | ( | const mpfr_t | radius, |
double | height | ||
) |
Find the precision needed to represent pixel coordinates in an image.
radius | The radius of the view. |
height | The height of the view in pixels. |
Definition at line 54 of file utility.c.
Referenced by interact_center(), interact_zoom_about(), and render_options_set_location().