Skip to content

"container full" is no properly calculated #1

@JannIds

Description

@JannIds

I tried to use sample "Check how many packages can be fitter into a given container"

$container = new Container(64, 39, 38);
$packages = [
new Package(30, 30, 24),
new Package(30, 30, 24),
new Package(30, 30, 24),
new Package(30, 30, 24),
new Package(30, 30, 24),
];

it doesn't show that container is full.
my responses are:
Package volume: int(108000)
Container volume: int(94848)
Container waste %: int(-13)
Container waste volume: int(-13152)
Container FULL: bool(false)

waste goes to negative, so i assume it is oversized of the container.

But in real life only 2 packages fits in container????

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions