refactor: seperate code into different files

This commit is contained in:
Patryk Hegenberg 2024-11-28 19:12:37 +01:00
parent 2f6f0b4efd
commit 997cc11a89
16 changed files with 845 additions and 364 deletions

23
utils.go Normal file
View file

@ -0,0 +1,23 @@
package main
func setNote(prozent float64) float64 {
switch {
case prozent <= 22:
return 6.00
case prozent <= 49:
return 5.00
case prozent <= 64:
return 4.00
case prozent <= 79:
return 3.00
case prozent <= 94:
return 2.00
default:
return 1.00
}
}
func checkGewichtung(lv, hv float64) bool {
sum := hv/100 + lv/100
return sum == 1
}