mirror of
https://github.com/enzet/map-machine.git
synced 2025-06-02 10:51:57 +02:00
Fix floating point numbers.
This commit is contained in:
parent
6e20668e24
commit
ed0e0384b7
23 changed files with 358 additions and 332 deletions
|
@ -54,7 +54,7 @@ class Map:
|
|||
def draw(self, constructor: Constructor) -> None:
|
||||
"""Draw map."""
|
||||
self.svg.add(
|
||||
Rect((0, 0), self.flinger.size, fill=self.background_color)
|
||||
Rect((0.0, 0.0), self.flinger.size, fill=self.background_color)
|
||||
)
|
||||
ways: list[StyledFigure] = sorted(
|
||||
constructor.figures, key=lambda x: x.line_style.priority
|
||||
|
@ -130,7 +130,7 @@ class Map:
|
|||
building.draw_shade(building_shade, self.flinger)
|
||||
self.svg.add(building_shade)
|
||||
|
||||
previous_height: float = 0
|
||||
previous_height: float = 0.0
|
||||
for height in sorted(constructor.heights):
|
||||
for building in constructor.buildings:
|
||||
if building.height < height or building.min_height > height:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue