mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2025-01-30 18:54:56 +01:00
Compare with fabs
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
This commit is contained in:
parent
9bfe4f222e
commit
771e0513bb
1 changed files with 2 additions and 1 deletions
|
@ -5,6 +5,7 @@
|
||||||
#include "database.h"
|
#include "database.h"
|
||||||
|
|
||||||
#include <girara/utils.h>
|
#include <girara/utils.h>
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
static void zathura_jumplist_reset_current(zathura_t* zathura);
|
static void zathura_jumplist_reset_current(zathura_t* zathura);
|
||||||
static void zathura_jumplist_append_jump(zathura_t* zathura);
|
static void zathura_jumplist_append_jump(zathura_t* zathura);
|
||||||
|
@ -120,7 +121,7 @@ zathura_jumplist_add(zathura_t* zathura)
|
||||||
zathura_jump_t* cur = zathura_jumplist_current(zathura);
|
zathura_jump_t* cur = zathura_jumplist_current(zathura);
|
||||||
|
|
||||||
if (cur != NULL) {
|
if (cur != NULL) {
|
||||||
if (cur->page == pagenum && cur->x == x && cur->y == y) {
|
if (cur->page == pagenum && fabs(cur->x - x) <= DBL_EPSILON && fabs(cur->y - y) <= DBL_EPSILON) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue