forked from dlubal-software/RFEM_Python_Client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMFE_ALG.py
More file actions
24 lines (18 loc) · 692 Bytes
/
MFE_ALG.py
File metadata and controls
24 lines (18 loc) · 692 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import math
def interpol(x=1.0,x1 = 0.0, x2=2.0,y1=5.0,y2=10.0):
y = y1 + (x - x1) / (x2 - x1) * (y2 - y1)
return y
# def logInterpol(x=1.0,x1 = 0.0, x2=2.0,y1=5.0,y2=10.0):
# y = (y2-y1) / (math.log(x2)-math.log(x1)) * (math.log(x)-math.log(x1))
# return y
def left(s, amount):
return s[:amount]
def right(s, amount):
return s[-amount:]
def KolomLetter(KolomGetal: int=1):
if int(KolomGetal/26.00001)>0:
Letter=chr(int(KolomGetal/26.00001)+64) + chr(KolomGetal-26*int(KolomGetal/26.00001)+64)
else:
Letter=chr(KolomGetal+64)
return Letter
#TODO: Functie ook geschikt maken voor de situatie waarin 3 of meer letters nodig zijn...