Skip to content

Find a proper solution to quadtree integer overflows #2

@grtlr

Description

@grtlr

The quad tree is currently based on integer boundaries. These can overflow for sufficiently large values, which can happen if the forces make the nodes fly away with a high velocity.

To solve this, we currently clamp the particles to i32::MIN and i32::MAX to prevent that from happening (we use i64 boundaries).

Still, if the user supplies values that are too large the quadtree::cover can crash.

We should fix this overall situation by correctly setting (i.e. clamping) the quad tree boundaries.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions