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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user