factoriolib / flib

A set of high-quality, commonly-used utilities for creating Factorio mods.
https://mods.factorio.com/mod/flib
MIT License
61 stars 15 forks source link

bug in bounding_box.from_dimensions #49

Closed pla closed 1 year ago

pla commented 1 year ago

Description

bounding_box.from_dimensions returns the same values for left_top and right bottom

player.print(serpent.block(flib_bounding_box.from_dimensions({ x = 0, y = 0 },10,10)))

returns

{ left_top = { x = -5, y = -5 }, right_bottom = { x = -5, y = -5 } }

flib_area.from_dimensions gives the correct answer

Reproduction

No response