#include <stdbool.h>
#include <mpfr.h>
Go to the source code of this file.
Functions | |
bool | parse_mdz_center (const char *source, int length, mpfr_t cx, mpfr_t cy, mpfr_t cz) |
Parse MDZ .mdz file format (center variant). |
bool parse_mdz_center | ( | const char * | source, |
int | length, | ||
mpfr_t | cx, | ||
mpfr_t | cy, | ||
mpfr_t | cz | ||
) |
Parse MDZ .mdz
file format (center variant).
File format example:
aspect 1.77777 cx -0.75 cy 0.0 size 5.33333
Size \(s\) is the real width, convert to radius \(r\) (half imaginary height) by using the aspect \(a\): \(r = \frac{s}{2 a}\). Double precision floating point has enough precision and enough range for any real-world aspect ratio.
source | A null-terminated input file already loaded into memory. |
length | Length of the input file (without the extra null terminator). |
cx | For output of the real part of the view center. It is already mpfr_init2() 'd. |
cy | For output of the imaginary part of the view center. It is already mpfr_init2() 'd. |
cz | For output of the view radius. It is already mpfr_init2() 'd. |
true
) or failure (false
). Definition at line 15 of file parse_mdz_center.c.
References parse_line(), precision_for_radius(), and radius_is_valid().