refactor: generator

This commit is contained in:
Ilia Denisov
2025-09-11 23:26:32 +03:00
parent 371453fac5
commit d3b00b5c8d
9 changed files with 241 additions and 201 deletions
+2 -2
View File
@@ -84,9 +84,9 @@ func (p bitmap) SetFreeN(number int) error {
return fmt.Errorf("set free pixel: no such number=%d, max=%d", number, n)
}
func (p bitmap) Circle(x, y int, r float64, fill bool) {
func (p bitmap) Circle(x, y int, r float32, fill bool) {
plotX := 0
plotY := int(math.Ceil(r))
plotY := int(math.Ceil(float64(r)))
delta := 3 - 2*plotY
lastY := plotY
for plotX <= plotY {