Skip to content

Reversing the order of arguments to segment_intersect in polygon_add_point causes failing tests #40

Open
@MaxineK36

Description

@MaxineK36

Currently, polygon_add_point (in polygon.c) makes a call to segment_intersect before adding a point to the polygon (line 116). However, when the order of the two segments is swapped, the return value of segment_intersect changes, and polygon_add_point fails in some of the tests when it's expected to succeed.

As students are updating this code to work with their new segment structs, they may (understandably) ignore the order of segments and accidentally swap them; due to the above issue, they then end up stuck trying to figure out why the tests suddenly fail.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions