Skip to content

getArea() and Polygonal2DRegion - don't return real value. #888

@LadyCailinBot

Description

@LadyCailinBot

WORLDEDIT-3096 - Reported by BukkitSmerf

Every Polygonal2DRegion returns other sizes than should, even rectangles:
Example code:

		Polygonal2DRegion polReg = new Polygonal2DRegion();
		polReg.addPoint(new BlockVector2D(1, 1));
		polReg.addPoint(new BlockVector2D(1, 10));
		polReg.addPoint(new BlockVector2D(10, 10));
		polReg.addPoint(new BlockVector2D(10, 1));
		// 10x10 = 100
		sender.sendMessage(Integer.toString(polReg.getArea()));
		// send 89 (9x9) instead of 100

I need that to block creating too big regions/selections.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status:acceptedWill be fixed / added to WorldEdit, eventuallytype:bugIncorrect behavior, not working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions