summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Peter <blendoit@gmail.com>2019-06-20 13:03:13 -0700
committerMarius Peter <blendoit@gmail.com>2019-06-20 13:03:13 -0700
commit8529e8d176a638a49082a9fa5e02208a2594e5b7 (patch)
treeb3c679fff8dd10b51f25d3aa6191e9fb5b5db9b1
parent44a872ca76d5d2dd48fb0c96701bac93e721d27b (diff)
remove useless cyclomatic complexifier
-rw-r--r--creator.py14
1 files changed, 6 insertions, 8 deletions
diff --git a/creator.py b/creator.py
index 49037f4..85a5805 100644
--- a/creator.py
+++ b/creator.py
@@ -167,14 +167,12 @@ class Airfoil(Coordinates):
"""
Returns thickness from 1 'x' along the airfoil chord.
"""
- y_t = float()
- if 0 <= x <= self.chord:
- y_t = 5 * t * self.chord * (
- +0.2969 * sqrt(x / self.chord)
- - 0.1260 * (x / self.chord)
- - 0.3516 * (x / self.chord)**2
- + 0.2843 * (x / self.chord)**3
- - 0.1015 * (x / self.chord)**4)
+ y_t = 5 * t * self.chord * (
+ +0.2969 * sqrt(x / self.chord)
+ - 0.1260 * (x / self.chord)
+ - 0.3516 * (x / self.chord)**2
+ + 0.2843 * (x / self.chord)**3
+ - 0.1015 * (x / self.chord)**4)
return y_t
def get_theta(x):
Copyright 2019--2024 Marius PETER