fix: generator deadZone overlapping

This commit is contained in:
IliaDenisov
2026-02-06 15:23:41 +03:00
parent 327f2865d4
commit ef10842dac
2 changed files with 4 additions and 10 deletions
+3 -1
View File
@@ -61,7 +61,9 @@ func (p Plotter) MarkDeadZone(x, y float64, radius float64) {
}
func (p Plotter) plotDeadZone(x, y int, radius float64) {
p.circleFn(x, y, radius/p.factor)
// Adding extra 'pixel' to avoid radius became less than deadZoneRaduis
// after division by factor due to floating-point operations specifics
p.circleFn(x, y, (radius+p.factor)/p.factor)
}
func (p Plotter) Clear() { p.clearFn() }