Skip to content

Shape::get_bound assumes 0,0 is inside the bounding box #19

Description

@MaxVerevkin

It uses

let mut bound = Bound::default();

as its initial bounding box, which contains all zeroes. If the shape does not contain the origin, this results in an incorrect box. The initial box should probably be something like

let mut bound = Bound {
    left: f64::INFINITY,
    bottom: f64::INFINITY,
    right: -f64::INFINITY,
    top: -f64::INFINITY,
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions