diff options
author | David Robillard <d@drobilla.net> | 2014-01-11 23:55:02 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2014-01-11 23:55:02 +0000 |
commit | b308ae521f19a41f0e7c59de2fe7b58ac443a74b (patch) | |
tree | b1dae93466bd8426be141f32008792e7c68973dd /src | |
parent | 14905ea58cc45c450c517e354b6c3de90f5f249b (diff) | |
download | ganv-b308ae521f19a41f0e7c59de2fe7b58ac443a74b.tar.gz ganv-b308ae521f19a41f0e7c59de2fe7b58ac443a74b.tar.bz2 ganv-b308ae521f19a41f0e7c59de2fe7b58ac443a74b.zip |
FDGL: Reduce oscillation.
git-svn-id: http://svn.drobilla.net/lad/trunk/ganv@5305 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r-- | src/Canvas.cpp | 2 | ||||
-rw-r--r-- | src/fdgl.hpp | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/Canvas.cpp b/src/Canvas.cpp index 01e6296..27e3cab 100644 --- a/src/Canvas.cpp +++ b/src/Canvas.cpp @@ -832,7 +832,7 @@ gboolean GanvCanvasImpl::layout_calculate(double dur, bool update) { // A light directional force to push sources to the top left - static const double DIR_MAGNITUDE = -2000.0; + static const double DIR_MAGNITUDE = -1000.0; Vector dir = { 0.0, 0.0 }; switch (_gcanvas->direction) { case GANV_DIRECTION_RIGHT: dir.x = DIR_MAGNITUDE; break; diff --git a/src/fdgl.hpp b/src/fdgl.hpp index d2fb17a..b40f333 100644 --- a/src/fdgl.hpp +++ b/src/fdgl.hpp @@ -16,8 +16,8 @@ #include <float.h> #include <math.h> -static const double CHARGE_KE = 2000000.0; -static const double EDGE_K = 32.0; +static const double CHARGE_KE = 1000000.0; +static const double EDGE_K = 16.0; static const double EDGE_LEN = 0.1; struct Region { @@ -148,7 +148,7 @@ rect_distance(Vector* vec, inline Vector repel_force(const Region& a, const Region& b) { - static const double MIN_DIST = DBL_EPSILON; + static const double MIN_DIST = 1.0; Vector vec; double dist = rect_distance( |