OCaml Forge
SCM

Detail: [#249] Path.direction returns 0

Bugs: Browse | Download .csv | Monitor

[#249] Path.direction returns 0

Date:
2009-07-17 12:01
Priority:
3
State:
Open
Submitted by:
Romain Bardou (doomeer)
Assigned to:
Nobody (None)
Resolution:
Accepted As Bug
Severity:
normal
Version:
v0.7
Operating System:
All
URL:
 
Summary:
Path.direction returns 0

Detailed description
Path.direction returns direction (0, 0) on paths which contain 2 points at the same place, for instance some paths produced by smart_path.

I suppose Path.direction takes two very close points, for instance 3.99 and 4.00, to get direction at point 4.00, but if points 3 and 4 are at the same place then direction is indeed (0, 0).

Then when the vector is normalized a division by zero occurs. In particular, arrows cannot be drawn using smart paths which often end by two points at the same position.

Followup

No Followups Have Been Posted

Attached Files:

Changes:

No Changes Have Been Made to This Item