Status command (#56)
* Add configurations to status * Update comment of status * Add config command * Modify README * Add EPSILON instead of subtract for a more reliable >= threshold
This commit is contained in:
parent
7d76db6693
commit
89b79bc9bc
@ -87,7 +87,8 @@ namespace comfortable_swipe::gesture
|
||||
? 1.00f
|
||||
: 0.01f; // square root of 1/10
|
||||
static const float EPSILON = 1e-6f;
|
||||
if (this->x * this->x + this->y * this->y > this->threshold_squared * scale - EPSILON)
|
||||
if (this->x * this->x + this->y * this->y
|
||||
> this->threshold_squared * scale + EPSILON)
|
||||
{
|
||||
int mask = 0;
|
||||
if (this->fingers == 3) mask |= swipe_gesture::MSK_THREE_FINGERS;
|
||||
|
||||
@ -24,6 +24,8 @@ extern "C"
|
||||
#include <xdo.h> // xdo, xdo_new
|
||||
}
|
||||
|
||||
#include "xdo_gesture.h"
|
||||
|
||||
namespace comfortable_swipe::gesture
|
||||
{
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user