Skip to content

Find a proper solution to quadtree integer overflows #2

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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