fix: spread out low person count

for 2 people tan is huge, so radius becomes ~0, hardcode for radius
~image size

and in css --r add part of image for 'offces from center'
This commit is contained in:
efim
2023-11-19 06:47:43 +00:00
parent af53bda10e
commit b13a43aa71
4 changed files with 22 additions and 20 deletions

View File

@@ -55,6 +55,10 @@ func (r *roomTableData)Total() int {
return len(r.Paricipants)
}
func (r *roomTableData)Tangens() float64 {
total := r.Total()
if total == 2 {
return 1
}
return math.Tan(math.Pi / float64(r.Total())) // Math.tan(Math.PI/m);
}