refactor: seperate code into different files
This commit is contained in:
parent
2f6f0b4efd
commit
997cc11a89
16 changed files with 845 additions and 364 deletions
23
utils.go
Normal file
23
utils.go
Normal 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
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue