summaryrefslogtreecommitdiff
path: root/lily/simple-spacer.cc
diff options
context:
space:
mode:
authorValentin Villenave <valentin@villenave.net>2008-01-13 18:59:20 +0100
committerValentin Villenave <valentin@villenave.net>2008-01-13 18:59:20 +0100
commit04faa1ba634c75c05716b7f49928ebe187862f20 (patch)
tree1dc2a257e78c74569545a722557a62b1ff794f52 /lily/simple-spacer.cc
parenta8b368dd6f242b00932b03ba170ab7e7389cb105 (diff)
second patch from Joe: fix a silly mistake with infinite stiff springs
Diffstat (limited to 'lily/simple-spacer.cc')
-rw-r--r--lily/simple-spacer.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/lily/simple-spacer.cc b/lily/simple-spacer.cc
index f16e607061..9129361cbd 100644
--- a/lily/simple-spacer.cc
+++ b/lily/simple-spacer.cc
@@ -84,7 +84,7 @@ Simple_spacer::rod_force (int l, int r, Real dist)
Real c = range_stiffness (l, r, dist > d);
Real block_stretch = dist - d;
- if (isinf (c)) /* take care of the 0*infinity_f case */
+ if (isinf (c) && block_stretch == 0) /* take care of the 0*infinity_f case */
return 0;
return c * block_stretch;
}