From e8ae279dd3c85d6924367cdaf783b2361a60303c Mon Sep 17 00:00:00 2001 From: JoePfeiffer Date: Wed, 13 Apr 2022 14:03:56 -0600 Subject: [PATCH] Instead of getTubesTouching() returning a boolean telling whether tubes are touching, use getTubeSeparation() returning the actual separation between tubes. This'll work just as well for the current effort, and will be more useful when we consider tubes with separation. --- .../src/net/sf/openrocket/rocketcomponent/TubeFinSet.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/net/sf/openrocket/rocketcomponent/TubeFinSet.java b/core/src/net/sf/openrocket/rocketcomponent/TubeFinSet.java index 63af7b3bd..685198726 100644 --- a/core/src/net/sf/openrocket/rocketcomponent/TubeFinSet.java +++ b/core/src/net/sf/openrocket/rocketcomponent/TubeFinSet.java @@ -95,12 +95,12 @@ public class TubeFinSet extends ExternalComponent implements AxialPositionable, } /** - * Return whether the tubes are touching + * Return distance between tubes. * - * @return true if touching, false if not + * @return distance between tubes. 0 if touching, negative if overlap */ - public boolean getTubesTouching() { - return getOuterRadius() > getTouchingRadius() - MathUtil.EPSILON; + public double getTubeSeparation() { + return 2.0*(getTouchingRadius() - getOuterRadius()); } /**