Skip to content

Fix direction calculation #28

@jordan-evens

Description

@jordan-evens

The check for if the spread angle should be updated happens after the distance check, so the result is incorrect

      p_p = (d < p_d) ? xy : p_p;
      p_d = (d < p_d) ? d : p_d;
      // FIX: this is going to be comparing the new p_d value so it is wrong but old behaviour
      p_a = (d < p_d) ? spread_current.direction.asDegrees() : p_a;

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